From b56a0bd2ed86057d63b4c82784dba3c92f3c32db Mon Sep 17 00:00:00 2001 From: Vladimir Loncar Date: Sun, 29 Sep 2024 01:42:20 +0200 Subject: [PATCH 1/9] Halt on errors in build_lib.sh --- hls4ml/templates/vivado/build_lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hls4ml/templates/vivado/build_lib.sh b/hls4ml/templates/vivado/build_lib.sh index 19f2d0a1c..e321e94df 100755 --- a/hls4ml/templates/vivado/build_lib.sh +++ b/hls4ml/templates/vivado/build_lib.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e CC=g++ if [[ "$OSTYPE" == "linux-gnu" ]]; then From 7beb6954df24f22e32ec6b3699d1a3943ea01fd2 Mon Sep 17 00:00:00 2001 From: Vladimir Loncar Date: Sun, 29 Sep 2024 01:43:47 +0200 Subject: [PATCH 2/9] make build_lib.sh executable by default and switch to using pathlib --- hls4ml/writer/vivado_writer.py | 55 +++++++++++++++++----------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/hls4ml/writer/vivado_writer.py b/hls4ml/writer/vivado_writer.py index 53ec98df1..e4c0c2455 100644 --- a/hls4ml/writer/vivado_writer.py +++ b/hls4ml/writer/vivado_writer.py @@ -1,7 +1,9 @@ import glob import os +import stat import tarfile from collections import OrderedDict +from pathlib import Path from shutil import copyfile, copytree, rmtree import numpy as np @@ -692,45 +694,44 @@ def write_build_script(self, model): model (ModelGraph): the hls4ml model. """ - filedir = os.path.dirname(os.path.abspath(__file__)) + filedir = Path(__file__).parent # project.tcl - f = open(f'{model.config.get_output_dir()}/project.tcl', 'w') - f.write('variable project_name\n') - f.write(f'set project_name "{model.config.get_project_name()}"\n') - f.write('variable backend\n') - f.write('set backend "vivado"\n') - f.write('variable part\n') - f.write('set part "{}"\n'.format(model.config.get_config_value('Part'))) - f.write('variable clock_period\n') - f.write('set clock_period {}\n'.format(model.config.get_config_value('ClockPeriod'))) - f.write('variable clock_uncertainty\n') - f.write('set clock_uncertainty {}\n'.format(model.config.get_config_value('ClockUncertainty', '12.5%'))) - f.write('variable version\n') - f.write('set version "{}"\n'.format(model.config.get_config_value('Version', '1.0.0'))) - f.close() + prj_tcl_dst = Path(f'{model.config.get_output_dir()}/project.tcl') + with open(prj_tcl_dst, 'w') as f: + f.write('variable project_name\n') + f.write(f'set project_name "{model.config.get_project_name()}"\n') + f.write('variable backend\n') + f.write('set backend "vivado"\n') + f.write('variable part\n') + f.write('set part "{}"\n'.format(model.config.get_config_value('Part'))) + f.write('variable clock_period\n') + f.write('set clock_period {}\n'.format(model.config.get_config_value('ClockPeriod'))) + f.write('variable clock_uncertainty\n') + f.write('set clock_uncertainty {}\n'.format(model.config.get_config_value('ClockUncertainty', '12.5%'))) + f.write('variable version\n') + f.write('set version "{}"\n'.format(model.config.get_config_value('Version', '1.0.0'))) # build_prj.tcl - srcpath = os.path.join(filedir, '../templates/vivado/build_prj.tcl') + srcpath = (filedir / '../templates/vivado/build_prj.tcl').resolve() dstpath = f'{model.config.get_output_dir()}/build_prj.tcl' copyfile(srcpath, dstpath) # vivado_synth.tcl - srcpath = os.path.join(filedir, '../templates/vivado/vivado_synth.tcl') + srcpath = (filedir / '../templates/vivado/vivado_synth.tcl').resolve() dstpath = f'{model.config.get_output_dir()}/vivado_synth.tcl' copyfile(srcpath, dstpath) # build_lib.sh - f = open(os.path.join(filedir, '../templates/vivado/build_lib.sh')) - fout = open(f'{model.config.get_output_dir()}/build_lib.sh', 'w') - - for line in f.readlines(): - line = line.replace('myproject', model.config.get_project_name()) - line = line.replace('mystamp', model.config.get_config_value('Stamp')) - - fout.write(line) - f.close() - fout.close() + build_lib_src = (filedir / '../templates/vivado/build_lib.sh').resolve() + build_lib_dst = Path(f'{model.config.get_output_dir()}/build_lib.sh').resolve() + with open(build_lib_src) as src, open(build_lib_dst, 'w') as dst: + for line in src.readlines(): + line = line.replace('myproject', model.config.get_project_name()) + line = line.replace('mystamp', model.config.get_config_value('Stamp')) + + dst.write(line) + build_lib_dst.chmod(build_lib_dst.stat().st_mode | stat.S_IEXEC) def write_nnet_utils(self, model): """Copy the nnet_utils, AP types headers and any custom source to the project output directory From 8bf5bd56149b209d6a64d84a427aed9b6508520f Mon Sep 17 00:00:00 2001 From: Vladimir Loncar Date: Sun, 29 Sep 2024 01:44:19 +0200 Subject: [PATCH 3/9] Use subprocess instead of os.system --- hls4ml/backends/fpga/fpga_backend.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/hls4ml/backends/fpga/fpga_backend.py b/hls4ml/backends/fpga/fpga_backend.py index 479af8ebf..f7f10a561 100644 --- a/hls4ml/backends/fpga/fpga_backend.py +++ b/hls4ml/backends/fpga/fpga_backend.py @@ -1,6 +1,7 @@ import math import os import re +import subprocess from bisect import bisect_left from collections.abc import Iterable @@ -131,19 +132,22 @@ def compile(self, model): Returns: string: Returns the name of the compiled library. """ - curr_dir = os.getcwd() - os.chdir(model.config.get_output_dir()) lib_name = None - try: - ret_val = os.system('bash build_lib.sh') - if ret_val != 0: - raise Exception(f'Failed to compile project "{model.config.get_project_name()}"') - lib_name = '{}/firmware/{}-{}.so'.format( - model.config.get_output_dir(), model.config.get_project_name(), model.config.get_config_value('Stamp') - ) - finally: - os.chdir(curr_dir) + ret_val = subprocess.run( + ['./build_lib.sh'], + shell=True, + text=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + cwd=model.config.get_output_dir() + ) + if ret_val.returncode != 0: + print(ret_val.stdout) + raise Exception(f'Failed to compile project "{model.config.get_project_name()}"') + lib_name = '{}/firmware/{}-{}.so'.format( + model.config.get_output_dir(), model.config.get_project_name(), model.config.get_config_value('Stamp') + ) return lib_name From 21a7e7b3f092ee4e04db1c446e0597847289e63b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 00:17:03 +0000 Subject: [PATCH 4/9] [pre-commit.ci] auto fixes from pre-commit hooks --- hls4ml/backends/fpga/fpga_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hls4ml/backends/fpga/fpga_backend.py b/hls4ml/backends/fpga/fpga_backend.py index f7f10a561..d6f2959d9 100644 --- a/hls4ml/backends/fpga/fpga_backend.py +++ b/hls4ml/backends/fpga/fpga_backend.py @@ -140,7 +140,7 @@ def compile(self, model): text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - cwd=model.config.get_output_dir() + cwd=model.config.get_output_dir(), ) if ret_val.returncode != 0: print(ret_val.stdout) From d0b1cfc7c7ee3e71c25bdd47851cd00676ae0a4e Mon Sep 17 00:00:00 2001 From: Vladimir Loncar Date: Mon, 30 Sep 2024 00:23:24 +0200 Subject: [PATCH 5/9] Follow up with Quartus and Catapult --- hls4ml/templates/quartus/build_lib.sh | 1 + hls4ml/templates/vivado/build_lib.sh | 5 +- hls4ml/writer/catapult_writer.py | 85 +++++++++++++-------------- hls4ml/writer/quartus_writer.py | 42 ++++++------- 4 files changed, 66 insertions(+), 67 deletions(-) diff --git a/hls4ml/templates/quartus/build_lib.sh b/hls4ml/templates/quartus/build_lib.sh index 02e92a199..5514a9cc7 100755 --- a/hls4ml/templates/quartus/build_lib.sh +++ b/hls4ml/templates/quartus/build_lib.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e CC=g++ if [[ "$OSTYPE" == "linux-gnu" ]]; then diff --git a/hls4ml/templates/vivado/build_lib.sh b/hls4ml/templates/vivado/build_lib.sh index e321e94df..8b2daf185 100755 --- a/hls4ml/templates/vivado/build_lib.sh +++ b/hls4ml/templates/vivado/build_lib.sh @@ -11,8 +11,9 @@ LDFLAGS= INCFLAGS="-Ifirmware/ap_types/" PROJECT=myproject LIB_STAMP=mystamp +WEIGHTS_DIR="\"weights\"" -${CC} ${CFLAGS} ${INCFLAGS} -c firmware/${PROJECT}.cpp -o ${PROJECT}.o -${CC} ${CFLAGS} ${INCFLAGS} -c ${PROJECT}_bridge.cpp -o ${PROJECT}_bridge.o +${CC} ${CFLAGS} ${INCFLAGS} -D WEIGHTS_DIR=${WEIGHTS_DIR} -c firmware/${PROJECT}.cpp -o ${PROJECT}.o +${CC} ${CFLAGS} ${INCFLAGS} -D WEIGHTS_DIR=${WEIGHTS_DIR} -c ${PROJECT}_bridge.cpp -o ${PROJECT}_bridge.o ${CC} ${CFLAGS} ${INCFLAGS} -shared ${PROJECT}.o ${PROJECT}_bridge.o -o firmware/${PROJECT}-${LIB_STAMP}.so rm -f *.o diff --git a/hls4ml/writer/catapult_writer.py b/hls4ml/writer/catapult_writer.py index af3f28a59..396ecb968 100755 --- a/hls4ml/writer/catapult_writer.py +++ b/hls4ml/writer/catapult_writer.py @@ -1,7 +1,9 @@ import glob import os +import stat import tarfile from collections import OrderedDict +from pathlib import Path from shutil import copyfile, copytree, rmtree import numpy as np @@ -749,55 +751,50 @@ def write_build_script(self, model): model (ModelGraph): the hls4ml model. """ - filedir = os.path.dirname(os.path.abspath(__file__)) + filedir = Path(__file__).parent # build_prj.tcl - srcpath = os.path.join(filedir, '../templates/catapult/build_prj.tcl') - dstpath = f'{model.config.get_output_dir()}/build_prj.tcl' - # copyfile(srcpath, dstpath) - f = open(srcpath) - fout = open(dstpath, 'w') - for line in f.readlines(): - indent = line[: len(line) - len(line.lstrip())] - line = line.replace('myproject', model.config.get_project_name()) - line = line.replace('CATAPULT_DIR', model.config.get_project_dir()) - if '#hls-fpga-machine-learning insert techlibs' in line: - if model.config.get_config_value('Technology') is None: - if model.config.get_config_value('Part') is not None: - line = indent + 'setup_xilinx_part {{{}}}\n'.format(model.config.get_config_value('Part')) - elif model.config.get_config_value('ASICLibs') is not None: - line = indent + 'setup_asic_libs {{{}}}\n'.format(model.config.get_config_value('ASICLibs')) - else: - if model.config.get_config_value('Technology') == 'asic': - line = indent + 'setup_asic_libs {{{}}}\n'.format(model.config.get_config_value('ASICLibs')) + srcpath = (filedir / '../templates/catapult/build_prj.tcl').resolve() + dstpath = Path(f'{model.config.get_output_dir()}/build_prj.tcl').resolve() + with open(srcpath) as src, open(dstpath, 'w') as dst: + for line in src.readlines(): + indent = line[: len(line) - len(line.lstrip())] + line = line.replace('myproject', model.config.get_project_name()) + line = line.replace('CATAPULT_DIR', model.config.get_project_dir()) + if '#hls-fpga-machine-learning insert techlibs' in line: + if model.config.get_config_value('Technology') is None: + if model.config.get_config_value('Part') is not None: + line = indent + 'setup_xilinx_part {{{}}}\n'.format(model.config.get_config_value('Part')) + elif model.config.get_config_value('ASICLibs') is not None: + line = indent + 'setup_asic_libs {{{}}}\n'.format(model.config.get_config_value('ASICLibs')) else: - line = indent + 'setup_xilinx_part {{{}}}\n'.format(model.config.get_config_value('Part')) - elif '#hls-fpga-machine-learning insert invoke_args' in line: - tb_in_file = model.config.get_config_value('InputData') - tb_out_file = model.config.get_config_value('OutputPredictions') - invoke_args = '$sfd/firmware/weights' - if tb_in_file is not None: - invoke_args = invoke_args + f' $sfd/tb_data/{tb_in_file}' - if tb_out_file is not None: - invoke_args = invoke_args + f' $sfd/tb_data/{tb_out_file}' - line = indent + f'flow package option set /SCVerify/INVOKE_ARGS "{invoke_args}"\n' - elif 'set hls_clock_period 5' in line: - line = indent + 'set hls_clock_period {}\n'.format(model.config.get_config_value('ClockPeriod')) - fout.write(line) - f.close() - fout.close() + if model.config.get_config_value('Technology') == 'asic': + line = indent + 'setup_asic_libs {{{}}}\n'.format(model.config.get_config_value('ASICLibs')) + else: + line = indent + 'setup_xilinx_part {{{}}}\n'.format(model.config.get_config_value('Part')) + elif '#hls-fpga-machine-learning insert invoke_args' in line: + tb_in_file = model.config.get_config_value('InputData') + tb_out_file = model.config.get_config_value('OutputPredictions') + invoke_args = '$sfd/firmware/weights' + if tb_in_file is not None: + invoke_args = invoke_args + f' $sfd/tb_data/{tb_in_file}' + if tb_out_file is not None: + invoke_args = invoke_args + f' $sfd/tb_data/{tb_out_file}' + line = indent + f'flow package option set /SCVerify/INVOKE_ARGS "{invoke_args}"\n' + elif 'set hls_clock_period 5' in line: + line = indent + 'set hls_clock_period {}\n'.format(model.config.get_config_value('ClockPeriod')) + dst.write(line) # build_lib.sh - f = open(os.path.join(filedir, '../templates/catapult/build_lib.sh')) - fout = open(f'{model.config.get_output_dir()}/build_lib.sh', 'w') - - for line in f.readlines(): - line = line.replace('myproject', model.config.get_project_name()) - line = line.replace('mystamp', model.config.get_config_value('Stamp')) - - fout.write(line) - f.close() - fout.close() + build_lib_src = (filedir / '../templates/catapult/build_lib.sh').resolve() + build_lib_dst = Path(f'{model.config.get_output_dir()}/build_lib.sh').resolve() + with open(build_lib_src) as src, open(build_lib_dst, 'w') as dst: + for line in src.readlines(): + line = line.replace('myproject', model.config.get_project_name()) + line = line.replace('mystamp', model.config.get_config_value('Stamp')) + + dst.write(line) + build_lib_dst.chmod(build_lib_dst.stat().st_mode | stat.S_IEXEC) def write_nnet_utils(self, model): """Copy the nnet_utils, AP types headers and any custom source to the project output directory diff --git a/hls4ml/writer/quartus_writer.py b/hls4ml/writer/quartus_writer.py index 8c0217f92..932a8b6a6 100644 --- a/hls4ml/writer/quartus_writer.py +++ b/hls4ml/writer/quartus_writer.py @@ -1,7 +1,9 @@ import glob import os +import stat import tarfile from collections import OrderedDict +from pathlib import Path from shutil import copyfile, copytree, rmtree import numpy as np @@ -877,32 +879,30 @@ def write_build_script(self, model): model (ModelGraph): the hls4ml model. """ - # Makefile - filedir = os.path.dirname(os.path.abspath(__file__)) - f = open(os.path.join(filedir, '../templates/quartus/Makefile')) - fout = open(f'{model.config.get_output_dir()}/Makefile', 'w') + filedir = Path(__file__).parent - for line in f.readlines(): - line = line.replace('myproject', model.config.get_project_name()) + # Makefile + makefile_src = (filedir / '../templates/quartus/Makefile').resolve() + makefile_dst = Path(f'{model.config.get_output_dir()}/Makefile').resolve() + with open(makefile_src) as src, open(makefile_dst, 'w') as dst: + for line in src.readlines(): + line = line.replace('myproject', model.config.get_project_name()) - if 'DEVICE :=' in line: - line = 'DEVICE := {}\n'.format(model.config.get_config_value('Part')) + if 'DEVICE :=' in line: + line = 'DEVICE := {}\n'.format(model.config.get_config_value('Part')) - fout.write(line) - f.close() - fout.close() + dst.write(line) # build_lib.sh - f = open(os.path.join(filedir, '../templates/quartus/build_lib.sh')) - fout = open(f'{model.config.get_output_dir()}/build_lib.sh', 'w') - - for line in f.readlines(): - line = line.replace('myproject', model.config.get_project_name()) - line = line.replace('mystamp', model.config.get_config_value('Stamp')) - - fout.write(line) - f.close() - fout.close() + build_lib_src = (filedir / '../templates/quartus/build_lib.sh').resolve() + build_lib_dst = Path(f'{model.config.get_output_dir()}/build_lib.sh').resolve() + with open(build_lib_src) as src, open(build_lib_dst, 'w') as dst: + for line in src.readlines(): + line = line.replace('myproject', model.config.get_project_name()) + line = line.replace('mystamp', model.config.get_config_value('Stamp')) + + dst.write(line) + build_lib_dst.chmod(build_lib_dst.stat().st_mode | stat.S_IEXEC) def write_nnet_utils(self, model): """Copy the nnet_utils, AP types headers and any custom source to the project output directory From b7c767b706d96c39f3141ff1e7f24f5ecae73b55 Mon Sep 17 00:00:00 2001 From: Vladimir Loncar Date: Mon, 30 Sep 2024 18:35:16 +0200 Subject: [PATCH 6/9] Fix unused import --- hls4ml/backends/fpga/fpga_backend.py | 1 - 1 file changed, 1 deletion(-) diff --git a/hls4ml/backends/fpga/fpga_backend.py b/hls4ml/backends/fpga/fpga_backend.py index d6f2959d9..7996adfd0 100644 --- a/hls4ml/backends/fpga/fpga_backend.py +++ b/hls4ml/backends/fpga/fpga_backend.py @@ -1,5 +1,4 @@ import math -import os import re import subprocess from bisect import bisect_left From 2f6443a7aac03da10b085ec0089cbd849bda6362 Mon Sep 17 00:00:00 2001 From: Vladimir Loncar Date: Tue, 1 Oct 2024 17:00:39 +0200 Subject: [PATCH 7/9] Fix SR writer --- hls4ml/writer/symbolic_writer.py | 67 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/hls4ml/writer/symbolic_writer.py b/hls4ml/writer/symbolic_writer.py index b442d3cd3..76d56b153 100644 --- a/hls4ml/writer/symbolic_writer.py +++ b/hls4ml/writer/symbolic_writer.py @@ -1,5 +1,7 @@ import glob import os +import stat +from pathlib import Path from shutil import copyfile, copytree, rmtree from hls4ml.backends import get_backend @@ -56,49 +58,48 @@ def write_build_script(self, model): model (ModelGraph): the hls4ml model. """ - filedir = os.path.dirname(os.path.abspath(__file__)) - - # build_prj.tcl - f = open(f'{model.config.get_output_dir()}/project.tcl', 'w') - f.write('variable project_name\n') - f.write(f'set project_name "{model.config.get_project_name()}"\n') - f.write('variable backend\n') - f.write('set backend "vivado"\n') - f.write('variable part\n') - f.write('set part "{}"\n'.format(model.config.get_config_value('Part'))) - f.write('variable clock_period\n') - f.write('set clock_period {}\n'.format(model.config.get_config_value('ClockPeriod'))) - f.write('variable clock_uncertainty\n') - f.write('set clock_uncertainty {}\n'.format(model.config.get_config_value('ClockUncertainty', '0%'))) - f.write('variable version\n') - f.write('set version "{}"\n'.format(model.config.get_config_value('Version', '1.0.0'))) - f.close() + filedir = Path(__file__).parent + + # project.tcl + prj_tcl_dst = Path(f'{model.config.get_output_dir()}/project.tcl') + with open(prj_tcl_dst, 'w') as f: + f.write('variable project_name\n') + f.write(f'set project_name "{model.config.get_project_name()}"\n') + f.write('variable backend\n') + f.write('set backend "vivado"\n') + f.write('variable part\n') + f.write('set part "{}"\n'.format(model.config.get_config_value('Part'))) + f.write('variable clock_period\n') + f.write('set clock_period {}\n'.format(model.config.get_config_value('ClockPeriod'))) + f.write('variable clock_uncertainty\n') + f.write('set clock_uncertainty {}\n'.format(model.config.get_config_value('ClockUncertainty', '0%'))) + f.write('variable version\n') + f.write('set version "{}"\n'.format(model.config.get_config_value('Version', '1.0.0'))) # build_prj.tcl - srcpath = os.path.join(filedir, '../templates/vivado/build_prj.tcl') + srcpath = (filedir / '../templates/vivado/build_prj.tcl').resolve() dstpath = f'{model.config.get_output_dir()}/build_prj.tcl' copyfile(srcpath, dstpath) # vivado_synth.tcl - srcpath = os.path.join(filedir, '../templates/vivado/vivado_synth.tcl') + srcpath = (filedir / '../templates/vivado/vivado_synth.tcl').resolve() dstpath = f'{model.config.get_output_dir()}/vivado_synth.tcl' copyfile(srcpath, dstpath) # build_lib.sh - f = open(os.path.join(filedir, '../templates/symbolic/build_lib.sh')) - fout = open(f'{model.config.get_output_dir()}/build_lib.sh', 'w') - - for line in f.readlines(): - line = line.replace('myproject', model.config.get_project_name()) - line = line.replace('mystamp', model.config.get_config_value('Stamp')) - line = line.replace('mylibspath', model.config.get_config_value('HLSLibsPath')) - - if 'LDFLAGS=' in line and not os.path.exists(model.config.get_config_value('HLSLibsPath')): - line = 'LDFLAGS=\n' - - fout.write(line) - f.close() - fout.close() + build_lib_src = (filedir / '../templates/symbolic/build_lib.sh').resolve() + build_lib_dst = Path(f'{model.config.get_output_dir()}/build_lib.sh').resolve() + with open(build_lib_src) as src, open(build_lib_dst, 'w') as dst: + for line in src.readlines(): + line = line.replace('myproject', model.config.get_project_name()) + line = line.replace('mystamp', model.config.get_config_value('Stamp')) + line = line.replace('mylibspath', model.config.get_config_value('HLSLibsPath')) + + if 'LDFLAGS=' in line and not os.path.exists(model.config.get_config_value('HLSLibsPath')): + line = 'LDFLAGS=\n' + + dst.write(line) + build_lib_dst.chmod(build_lib_dst.stat().st_mode | stat.S_IEXEC) def write_hls(self, model): print('Writing HLS project') From d30773f870f2bc244bde23fabe60c3b5ba7776aa Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski Date: Tue, 1 Oct 2024 13:41:31 -0500 Subject: [PATCH 8/9] update qkeras in Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b943ce348..5ca79a484 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { sh '''#!/bin/bash --login conda activate hls4ml-py310 conda install -y jupyterhub pydot graphviz pytest pytest-cov - pip install pytest-randomly jupyter onnx>=1.4.0 matplotlib pandas seaborn pydigitalwavetools==1.1 pyyaml tensorflow==2.14 qonnx torch git+https://github.com/google/qkeras.git pyparsing + pip install pytest-randomly jupyter onnx>=1.4.0 matplotlib pandas seaborn pydigitalwavetools==1.1 pyyaml tensorflow==2.14 qonnx torch git+https://github.com/jmitrevs/qkeras.git@qrecurrent_unstack pyparsing pip install -U ../ --user ./convert-keras-models.sh -x -f keras-models.txt pip uninstall hls4ml -y''' From 308af4ed6f992617594528b16664306cc928714b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:40:33 +0000 Subject: [PATCH 9/9] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.8.0 → 24.10.0](https://github.com/psf/black/compare/24.8.0...24.10.0) - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/asottile/pyupgrade: v3.17.0 → v3.18.0](https://github.com/asottile/pyupgrade/compare/v3.17.0...v3.18.0) - [github.com/asottile/setup-cfg-fmt: v2.5.0 → v2.7.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.5.0...v2.7.0) - [github.com/mgedmin/check-manifest: 0.49 → 0.50](https://github.com/mgedmin/check-manifest/compare/0.49...0.50) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b3d87219..8ef3dd41d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: (^hls4ml\/templates\/(vivado|quartus)\/(ap_types|ac_types)\/|^test/pyte repos: - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black language_version: python3 @@ -10,7 +10,7 @@ repos: '--skip-string-normalization'] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -30,13 +30,13 @@ repos: args: ["--profile", "black", --line-length=125] - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.18.0 hooks: - id: pyupgrade args: ["--py36-plus"] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.5.0 + rev: v2.7.0 hooks: - id: setup-cfg-fmt @@ -50,7 +50,7 @@ repos: '--extend-ignore=E203,T201'] # E203 is not PEP8 compliant - repo: https://github.com/mgedmin/check-manifest - rev: "0.49" + rev: "0.50" hooks: - id: check-manifest stages: [manual]