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
This commit is contained in:
committed by
Maneesh Gupta
parent
bb7cfaf91a
commit
f337ae1edb
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user