fastmachinelearning / hls4ml

Machine learning on FPGAs using HLS
https://fastmachinelearning.org/hls4ml
Apache License 2.0
1.22k stars 396 forks source link

VivadoAccelerator for U250 card #670

Closed Sarika124 closed 1 year ago

Sarika124 commented 1 year ago

Hi.. Is VivadoAccelarator of hls4ml will support U250 card? If we want to deploy cnn model to u250 card what all the changes we need to do accordingly on the code?? Any leads would be appreciated.

thesps commented 1 year ago

I transferred the issue to hls4ml. In the current main branch hls4ml does support U250 cards. I recommend this way of getting the initial VivadoAccelerator configuration template from the backend, specifying the board. Then you need to specify the same 'Platform' as the one you have installed on your system. I have an Alveo U200, with xilinx_u200_xdma_201830_2 platform, so my code looks like:

config = hls4ml.backends.get_backend('VivadoAccelerator').create_initial_config(board='alveo-u200')
config['AcceleratorConfig']['Platform'] = 'xilinx_u200_xdma_201830_2'
config['HLSConfig'] = hls_config
config['KerasModel'] = model
config['OutputDir'] = '...'
config['ProjectName'] = '...'
config['Backend'] = 'VivadoAccelerator'
hls_model = hls4ml.converters.keras_to_hls(config)

And note that currently this is only working with Vivado 2020.1