-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'xcku115-flvb2104-2-i' #56
Comments
If you do a grep, To easily fix the issue that you're having, you will need to modify those two files after you have compiled and before you build your model. Open Most likely, what happened is that someone set some default target device within As an aside, you don't have to necessarily use the xcu250-figd2104-2L-e FPGA. If you run Vivado in the terminal, If you want to avoid this issue in the future, and without having to constantly modify the project files after compilation, then the best solution would be to install additional devices using the command line: |
@isledge thanks for the answer
It solves the problem. ❤️ |
Hello! I am not an expert, but I am trying to run a notebook inside this docker container. I have 2 issues.
ERROR: [HLS 200-70] Part 'xcku115-flvb2104-2-i' is not installed.
command 'ap_source' returned error code
while executing
"source build_prj.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $arg] "
`import hls4ml
from hls4ml.converters import convert_from_keras_model
import plotting
Then the QKeras model
'''hls4ml.model.optimizer.OutputRoundingSaturationMode.layers = ['Activation']
hls4ml.model.optimizer.OutputRoundingSaturationMode.rounding_mode = 'AP_RND'
hls4ml.model.optimizer.OutputRoundingSaturationMode.saturation_mode = 'AP_SAT'
'''
reuse_model=256
q_hls_config = hls4ml.utils.config_from_keras_model(qmodel_pruned, granularity='name')
q_hls_config['Model']['ReuseFactor'] = reuse_model
q_hls_config['Model']['Precision'] = 'ap_fixed<16,6>'
q_hls_config['Model']['Strategy'] = 'Resource'
#q_hls_config['LayerName']['output_softmax']['Strategy'] = 'Resource'
q_hls_config['LayerName']['Input_layer']['Precision'] = 'ap_fixed<16,16>'
for layer in qmodel_pruned.layers:
if ('CONV' in layer.name.upper()) or ('DENSE' in layer.name.upper()):
q_hls_config['LayerName'][layer.name]['ReuseFactor'] = reuse_model
#if 'POOL' in layer.name.upper():
# q_hls_config['LayerName'][layer.name]['Precision']='ap_fixed<32,16>'
q_hls_config['LayerName']['output_dense']['ReuseFactor'] = reuse_model
q_hls_config['LayerName']['output_softmax']['ReuseFactor'] = reuse_model
q_hls_config['LayerName']['output_dense_linear']['ReuseFactor'] = reuse_model
q_hls_config['LayerName']['output_dense_linear']['ReuseFactor'] = reuse_model
q_cfg = hls4ml.converters.create_config(backend='Vivado')
q_cfg['IOType'] = 'io_stream' # Must set this if using CNNs!
q_cfg['HLSConfig'] = q_hls_config
q_cfg['KerasModel'] = qmodel_pruned
q_cfg['OutputDir'] = 'q_cnn_pruned/'
q_cfg['XilinxPart'] = 'xczu7ev-ffvc1156-2-e'
q_hls_model= hls4ml.converters.keras_to_hls(q_cfg)
q_hls_model.compile()
'''q_hls_model_test = convert_from_keras_model(
qmodel_pruned, hls_config=q_cfg, output_dir='model_final/hls4ml_model', part='xcu250-figd2104-2L-e'
)'''
print("----------------------------------------------------------------------------------")
#q_hls_model_test.compile()
print("---------------------------")
os.environ['PATH'] = os.environ['XILINX_VIVADO'] + '/bin:' + os.environ['PATH']
q_hls_model.build(csim=False, synth=True, vsynth=True)
`
2. I saw in tutorial part 6 you use the keras_to_hls function, but in all other parts, you use the convert_from_keras_model. Why? And When I tried to convert my CNN model by the second one, holping this could magically fix the problem, the compilation runs forever. Anyone could help me, please??
The text was updated successfully, but these errors were encountered: