|
9 | 9 | "name": "stderr",
|
10 | 10 | "output_type": "stream",
|
11 | 11 | "text": [
|
12 |
| - "2024-09-16 15:05:42.586474: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA\n", |
| 12 | + "2024-09-16 16:48:07.678368: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA\n", |
13 | 13 | "To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
|
14 |
| - "2024-09-16 15:05:42.694392: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory\n", |
15 |
| - "2024-09-16 15:05:42.694414: I tensorflow/compiler/xla/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.\n", |
16 |
| - "2024-09-16 15:05:43.217525: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory\n", |
17 |
| - "2024-09-16 15:05:43.217583: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory\n", |
18 |
| - "2024-09-16 15:05:43.217590: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.\n" |
| 14 | + "2024-09-16 16:48:07.780357: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory\n", |
| 15 | + "2024-09-16 16:48:07.780375: I tensorflow/compiler/xla/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.\n", |
| 16 | + "2024-09-16 16:48:08.294768: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory\n", |
| 17 | + "2024-09-16 16:48:08.294833: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory\n", |
| 18 | + "2024-09-16 16:48:08.294840: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.\n" |
19 | 19 | ]
|
20 | 20 | },
|
21 | 21 | {
|
|
34 | 34 | "name": "stderr",
|
35 | 35 | "output_type": "stream",
|
36 | 36 | "text": [
|
37 |
| - "/home/jcampos/miniforge3/envs/ml4qick-env/lib/python3.8/site-packages/hls4ml/converters/__init__.py:27: UserWarning: WARNING: Pytorch converter is not enabled!\n", |
| 37 | + "/data/jcampos/projects/ml-quantum-readout/environment/hls4ml/hls4ml/converters/__init__.py:27: UserWarning: WARNING: Pytorch converter is not enabled!\n", |
38 | 38 | " warnings.warn(\"WARNING: Pytorch converter is not enabled!\", stacklevel=1)\n"
|
39 | 39 | ]
|
40 | 40 | }
|
|
210 | 210 | "name": "stderr",
|
211 | 211 | "output_type": "stream",
|
212 | 212 | "text": [
|
213 |
| - "2024-09-16 15:05:48.812504: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory\n", |
214 |
| - "2024-09-16 15:05:48.812560: W tensorflow/compiler/xla/stream_executor/cuda/cuda_driver.cc:265] failed call to cuInit: UNKNOWN ERROR (303)\n", |
215 |
| - "2024-09-16 15:05:48.812599: I tensorflow/compiler/xla/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (correlator4.fnal.gov): /proc/driver/nvidia/version does not exist\n", |
216 |
| - "2024-09-16 15:05:48.813005: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA\n", |
| 213 | + "2024-09-16 16:48:11.835530: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory\n", |
| 214 | + "2024-09-16 16:48:11.835556: W tensorflow/compiler/xla/stream_executor/cuda/cuda_driver.cc:265] failed call to cuInit: UNKNOWN ERROR (303)\n", |
| 215 | + "2024-09-16 16:48:11.835575: I tensorflow/compiler/xla/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (correlator4.fnal.gov): /proc/driver/nvidia/version does not exist\n", |
| 216 | + "2024-09-16 16:48:11.835777: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA\n", |
217 | 217 | "To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
|
218 | 218 | ]
|
219 | 219 | },
|
|
265 | 265 | " model.add(QDense(\n",
|
266 | 266 | " hidden, \n",
|
267 | 267 | " activation='relu', \n",
|
268 |
| - " name='fc1',\n", |
| 268 | + " # name='fc1',\n", |
269 | 269 | " input_shape=(input_shape,), \n",
|
270 | 270 | " kernel_quantizer=quantized_bits(6,0,alpha=1), bias_quantizer=quantized_bits(6,0,alpha=1)\n",
|
271 | 271 | " ))\n",
|
|
312 | 312 | },
|
313 | 313 | {
|
314 | 314 | "cell_type": "code",
|
315 |
| - "execution_count": 8, |
| 315 | + "execution_count": 7, |
316 | 316 | "metadata": {},
|
317 | 317 | "outputs": [
|
318 | 318 | {
|
|
405 | 405 | },
|
406 | 406 | {
|
407 | 407 | "cell_type": "code",
|
408 |
| - "execution_count": 94, |
| 408 | + "execution_count": 8, |
409 | 409 | "metadata": {},
|
410 | 410 | "outputs": [],
|
411 | 411 | "source": [
|
|
414 | 414 | },
|
415 | 415 | {
|
416 | 416 | "cell_type": "code",
|
417 |
| - "execution_count": 95, |
| 417 | + "execution_count": 9, |
418 | 418 | "metadata": {},
|
419 | 419 | "outputs": [
|
420 | 420 | {
|
421 | 421 | "name": "stdout",
|
422 | 422 | "output_type": "stream",
|
423 | 423 | "text": [
|
424 |
| - "3125/3125 [==============================] - 5s 1ms/step\n", |
| 424 | + "3125/3125 [==============================] - 5s 2ms/step\n", |
425 | 425 | "Keras Accuracy: 0.96111\n",
|
426 | 426 | "Keras Fidelity: 0.92222\n"
|
427 | 427 | ]
|
|
518 | 518 | },
|
519 | 519 | {
|
520 | 520 | "cell_type": "code",
|
521 |
| - "execution_count": 10, |
| 521 | + "execution_count": 11, |
522 | 522 | "metadata": {},
|
523 | 523 | "outputs": [],
|
524 | 524 | "source": [
|
|
532 | 532 | },
|
533 | 533 | {
|
534 | 534 | "cell_type": "code",
|
535 |
| - "execution_count": 88, |
| 535 | + "execution_count": 12, |
536 | 536 | "metadata": {},
|
537 | 537 | "outputs": [
|
538 | 538 | {
|
|
615 | 615 | },
|
616 | 616 | {
|
617 | 617 | "cell_type": "code",
|
618 |
| - "execution_count": 93, |
| 618 | + "execution_count": 13, |
619 | 619 | "metadata": {},
|
620 | 620 | "outputs": [],
|
621 | 621 | "source": [
|
622 | 622 | "output_dir = f'../hls4ml_projects/sl-{start_location}_ws-{window_size}'\n",
|
623 | 623 | "xilinx_part = 'xczu49dr-ffvf1760-2-e'\n",
|
624 | 624 | "io_type = 'io_parallel'\n",
|
625 | 625 | "clock_period = 3.225 # 3.225ns (307.2 MHz)\n",
|
626 |
| - "hls_fig = os.path.join(output_dir, 'model.png')" |
| 626 | + "hls_fig = os.path.join(output_dir, 'model.png')\n", |
| 627 | + "backend = 'VivadoAccelerator'\n", |
| 628 | + "interface = 'axi_master'\n", |
| 629 | + "driver = 'c'\n", |
| 630 | + "board = 'zcu216'" |
627 | 631 | ]
|
628 | 632 | },
|
629 | 633 | {
|
630 | 634 | "cell_type": "code",
|
631 |
| - "execution_count": 89, |
| 635 | + "execution_count": 14, |
632 | 636 | "metadata": {},
|
633 | 637 | "outputs": [
|
634 | 638 | {
|
|
672 | 676 | " part=xilinx_part,\n",
|
673 | 677 | " io_type=io_type,\n",
|
674 | 678 | " clock_period=clock_period,\n",
|
| 679 | + " backend=backend,\n", |
| 680 | + " board=board,\n", |
| 681 | + " interface=interface,\n", |
| 682 | + " driver=driver,\n", |
675 | 683 | ")\n",
|
676 | 684 | "\n",
|
677 | 685 | "print(f\"Creating hls4ml project directory {output_dir}\")\n",
|
|
692 | 700 | },
|
693 | 701 | {
|
694 | 702 | "cell_type": "code",
|
695 |
| - "execution_count": 90, |
| 703 | + "execution_count": 15, |
696 | 704 | "metadata": {},
|
697 | 705 | "outputs": [
|
698 | 706 | {
|
|
728 | 736 | },
|
729 | 737 | {
|
730 | 738 | "cell_type": "code",
|
731 |
| - "execution_count": 91, |
| 739 | + "execution_count": 16, |
732 | 740 | "metadata": {},
|
733 | 741 | "outputs": [
|
734 | 742 | {
|
|
752 | 760 | "output_type": "stream",
|
753 | 761 | "text": [
|
754 | 762 | "Done\n",
|
755 |
| - "3125/3125 [==============================] - 3s 981us/step\n", |
756 |
| - "3125/3125 [==============================] - 5s 2ms/step\n", |
| 763 | + "3125/3125 [==============================] - 3s 1ms/step\n", |
| 764 | + "3125/3125 [==============================] - 5s 1ms/step\n", |
757 | 765 | "Done taking outputs for Keras model.\n",
|
758 | 766 | "HLS Keys: dict_keys(['q_dense_1', 'q_dense_1_relu', 'q_batch_normalization_1', 'fc2'])\n",
|
759 | 767 | "Keras Keys: dict_keys(['q_dense_1', 'q_dense_1_relu', 'q_batch_normalization_1', 'fc2'])\n"
|
|
770 | 778 | },
|
771 | 779 | {
|
772 | 780 | "cell_type": "code",
|
773 |
| - "execution_count": 92, |
| 781 | + "execution_count": 17, |
774 | 782 | "metadata": {},
|
775 | 783 | "outputs": [
|
776 | 784 | {
|
|
0 commit comments