ReconfigureIO / reco-sdaccel

0 stars 1 forks source link

Error in benchmark-histogram "ERROR: some device is already programmed" #251

Open pwaller opened 5 years ago

pwaller commented 5 years ago

This is a reminder to come back to this issue:

test-histogram works fine with real hardware on an f1 AWS instance, but bench-histogram does not:

(taken from the example in this repository)

 ./bench-histogram
xclProbe found 1 FPGA slots with xocl driver running
This AFI already loaded. Skip reload!
Successfully skipped reloading of local image.
2018/12/19 09:59:26 Running with N: 1
2018/12/19 09:59:26 Wrote input of size: 4
2018/12/19 09:59:26 Set arg 1
2018/12/19 09:59:26 Set arg 2
2018/12/19 09:59:26 Set arg 3
2018/12/19 09:59:26 Run
2018/12/19 09:59:26 Done
ERROR: some device is already programmed
Error: Failed to create compute program from binary -5!

Chris made this comment:

mm - I have a feeling the test bench process is a bit of a kludge and may repeatedly load the AFI for each 'N'. That may be what's breaking.

I have very briefly considered the 'user code' and I don't see anything obviously wrong with it, implying that our problem is likely deeper within our use of SDAccel.

pwaller commented 5 years ago

Further slack notes:

chris.holgate [10:13 AM] OK - I'll revisit that at some point. IIRC, the 'Process' function is called repeatedly from the benchmark framework, which could be where the AFI reload attempt occurs. Some refactoring will probably be required.

Peter Waller [10:14 AM] Interestingly though, the reload is happening also with test-histogram, and it prints a warning as it starts but happily runs repeatedly.

chris.holgate [10:16 AM] That's an initial load attempt at the start of the application, so maybe is handled. The benchmark would try multiple load attempts, where the first one may fail gracefully but subsequent ones cause the error. That's my guess at the moment.