forked from OSchip/llvm-project
GPURuntime: Check for debug-mode early on
Before this change, the debug statements in polly_initDevice would all be skipped, as debug-mode would only be enabled _after_ they have already been run. llvm-svn: 276621
This commit is contained in:
parent
c20d47751d
commit
0a1a2720c8
|
@ -220,6 +220,8 @@ static int initialDeviceAPIs() {
|
|||
}
|
||||
|
||||
void polly_initDevice(PollyGPUContext **Context, PollyGPUDevice **Device) {
|
||||
DebugMode = getenv("POLLY_DEBUG") != 0;
|
||||
|
||||
dump_function();
|
||||
|
||||
int Major = 0, Minor = 0, DeviceID = 0;
|
||||
|
@ -264,8 +266,6 @@ void polly_initDevice(PollyGPUContext **Context, PollyGPUDevice **Device) {
|
|||
exit(-1);
|
||||
}
|
||||
CuCtxCreateFcnPtr(&((*Context)->Cuda), 0, (*Device)->Cuda);
|
||||
|
||||
DebugMode = getenv("POLLY_DEBUG") != 0;
|
||||
}
|
||||
|
||||
void polly_getPTXModule(void *PTXBuffer, PollyGPUModule **Module) {
|
||||
|
|
Loading…
Reference in New Issue