consolidate thread local storage (#915)
* all thread local access now through single struct
* clean up old commented-out code, more use of GET_TLS()
* fewer calls to GET_TLS by passing tls as a funtion argument
* revert unnecessary change to printf
* fix failing tests due to TLS change
* fix merge conflicts in ihipOccupancyMaxActiveBlocksPerMultiprocessor
[ROCm/hip commit: 1eb3dbf065]
Tento commit je obsažen v:
@@ -136,14 +136,14 @@ hipError_t hipSetDevice(int deviceId) {
|
||||
return ihipLogStatus(hipErrorInvalidDevice);
|
||||
} else {
|
||||
ihipSetTlsDefaultCtx(ihipGetPrimaryCtx(deviceId));
|
||||
tls_getPrimaryCtx = true;
|
||||
tls->getPrimaryCtx = true;
|
||||
return ihipLogStatus(hipSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
hipError_t hipDeviceSynchronize(void) {
|
||||
HIP_INIT_SPECIAL_API(hipDeviceSynchronize, TRACE_SYNC);
|
||||
return ihipLogStatus(ihipSynchronize());
|
||||
return ihipLogStatus(ihipSynchronize(tls));
|
||||
}
|
||||
|
||||
hipError_t hipDeviceReset(void) {
|
||||
@@ -171,7 +171,7 @@ hipError_t hipDeviceReset(void) {
|
||||
}
|
||||
|
||||
|
||||
hipError_t ihipDeviceSetState(void) {
|
||||
hipError_t ihipDeviceSetState(TlsData *tls) {
|
||||
hipError_t e = hipErrorInvalidContext;
|
||||
auto* ctx = ihipGetTlsDefaultCtx();
|
||||
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele