hls4ml icon indicating copy to clipboard operation
hls4ml copied to clipboard

Profiling layers in an RNN

Open olaiya opened this issue 1 year ago • 0 comments

Hello

I'm using hls4ml from the main branch. Looking at hls4ml.version I get 0.8.0.dev11+gabaea98a. I'm looking to profile the layers in my RNN. However when I use

hls4ml.model.profiling.numerical with my model I get the following error:

Traceback (most recent call last): File "rnn_hls4ml.py", line 124, in plots = hls4ml.model.profiling.numerical(model=model, hls_model=hls_model_reg, X=X_test) File "/usr/local/lib/python3.8/dist-packages/hls4ml/model/profiling.py", line 460, in numerical data = weights_hlsmodel(hls_model_unoptimized, fmt='summary', plot=plot) File "/usr/local/lib/python3.8/dist-packages/hls4ml/model/profiling.py", line 225, in weights_hlsmodel label = f'{name}/{suffix[iw]}'

I have generated an example in github to demonstrate the problem.

The example can be found here:

https://github.com/olaiya/rnn_hls4ml/blob/master/rnn_hls4ml.py

You can run the example with

git clone https://github.com/olaiya/rnn_hls4ml.git

cd rnn_hls4ml/

python3 rnn_hls4ml.py

How do I correctly generate the plots for profiling RNN layers?

Thanks

Manny

olaiya avatar Jul 04 '23 10:07 olaiya