P4 to Git Change 1550486 by cpaquot@cpaquot-ocl-lc-lnx on 2018/05/04 14:00:33
SWDEV-145570 - [HIP] Fix multithread init Make the g_ihipInitialized variable per thread And make sure to assign a default g_context Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#10 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#9 edit
Este cometimento está contido em:
@@ -28,12 +28,12 @@ THE SOFTWARE.
|
||||
#include <thread>
|
||||
|
||||
std::vector<amd::Context*> g_devices;
|
||||
std::once_flag g_ihipInitialized;
|
||||
|
||||
namespace hip {
|
||||
|
||||
thread_local amd::Context* g_context = nullptr;
|
||||
thread_local std::stack<amd::Context*> g_ctxtStack;
|
||||
std::once_flag g_ihipInitialized;
|
||||
|
||||
std::map<amd::Context*,amd::HostQueue*> g_nullStreams;
|
||||
|
||||
@@ -53,7 +53,6 @@ void init() {
|
||||
context->release();
|
||||
} else {
|
||||
g_devices.push_back(context);
|
||||
g_context = context;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador