You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please make sure to check off these prerequisites before submitting a bug report.
Test that the bug appears on the current version of the master branch. Make sure to include the commit hash of the commit you checked out.
Check that the issue hasn't already been reported, by checking the currently open issues.
If there are steps to reproduce the problem, make sure to write them down below.
Quick summary
Model using SeparableConv1D fail CSynth when using Vitis backend.
Steps to Reproduce
Using Vitis 2022.2:
Clone the hls4ml repository
Checkout the main branch, with commit hash: d035738
Run the following script:
fromkeras.layersimportInputfromkeras.modelsimportModelfromqkerasimport*importhls4mldefget_model():
# Define a dummy model with only one QSeparableConv1D layerinput_layer=Input(shape=(32, 3))
layer=QSeparableConv1D(
filters=16,
kernel_size=3,
depthwise_quantizer=quantized_bits(16, 6, alpha=1),
pointwise_quantizer=quantized_bits(16, 6, alpha=1),
bias_quantizer=quantized_bits(16, 6, alpha=1)
)(input_layer)
model=Model(inputs=input_layer, outputs=layer)
returnmodelmodel=get_model()
model.summary()
config=hls4ml.utils.config_from_keras_model(model, granularity="name")
# Configure the project to be SeparableConv1D compatibleconfig['Model']['Precision'] ='ap_fixed<16,6>'config['Model']['ReuseFactor'] =1config['Model']['Strategy'] ='Latency'# Use the Vivado backend (2020.1)cfg=hls4ml.converters.create_config(backend='Vitis')
cfg['IOType'] ='io_stream'cfg['HLSConfig'] =configcfg['KerasModel'] =modelcfg['OutputDir'] ='hls4ml_prj'cfg['Part'] ='xcku115-flvb2104-2-i'hls_model=hls4ml.converters.keras_to_hls(cfg)
hls_model.compile()
hls_model.build(reset=True, csim=False, synth=True)
Expected behavior
Successful CSynt.
Actual behavior
CSytnh fail with the following error: ERROR: [HLS 214-272] In function 'void nnet::depthwise_product<ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>, ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>, config2_depthwise>(ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>*, ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>*, config2_depthwise::weight_t*, config2_depthwise::bias_t*)', Pragma conflict happens on 'INLINE' and 'PIPELINE'FUNCTION_INSTANTIATE' pragmas: same function (firmware/nnet_utils/nnet_sepconv_stream.h:13:0)
The text was updated successfully, but these errors were encountered:
Prerequisites
Please make sure to check off these prerequisites before submitting a bug report.
Quick summary
Model using SeparableConv1D fail CSynth when using Vitis backend.
Steps to Reproduce
Using Vitis 2022.2:
Expected behavior
Successful CSynt.
Actual behavior
CSytnh fail with the following error:
ERROR: [HLS 214-272] In function 'void nnet::depthwise_product<ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>, ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>, config2_depthwise>(ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>*, ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>*, config2_depthwise::weight_t*, config2_depthwise::bias_t*)', Pragma conflict happens on 'INLINE' and 'PIPELINE'FUNCTION_INSTANTIATE' pragmas: same function (firmware/nnet_utils/nnet_sepconv_stream.h:13:0)
The text was updated successfully, but these errors were encountered: