XRT icon indicating copy to clipboard operation
XRT copied to clipboard

fix hipMalloc() issue when running in multithreads.

Open zhangchiming opened this issue 1 year ago • 0 comments

fix hipMalloc() issue when running in multithreads.

Problem solved by the commit crash on calling hipMalloc() from multiple threads.

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered Issue was found during developing unit testing case.

How problem was solved, alternative solutions (if any) and why they were rejected Add lock for memory_database::remove() and memory_database::insert(). Allow device_init() be called once per thread.

Risks (if any) associated the changes in the commit None. Code will only be built with switch "-hip".

What has been tested and how, request additional testing if necessary Compiled and tested on Ubuntu 22.04 running on Ryzen 7840.

Documentation impact (if any) None.

zhangchiming avatar May 01 '24 08:05 zhangchiming