Context update.
- Remove tls_deviceID.
- Add first passing test.
Change-Id: If3e2f254abf589028cfe4f9e6369745f04160de0
[ROCm/hip commit: 89164259ab]
This commit is contained in:
@@ -68,9 +68,6 @@ extern int HIP_DISABLE_HW_COPY_DEP;
|
||||
|
||||
//---
|
||||
//Extern tls
|
||||
extern thread_local int tls_defaultDeviceId;
|
||||
extern thread_local ihipCtx_t *tls_defaultCtx;
|
||||
|
||||
extern thread_local hipError_t tls_lastHipError;
|
||||
|
||||
|
||||
@@ -653,6 +650,7 @@ extern hsa_agent_t g_cpu_agent ; // the CPU agent.
|
||||
extern void ihipInit();
|
||||
extern const char *ihipErrorString(hipError_t);
|
||||
extern ihipCtx_t *ihipGetTlsDefaultCtx();
|
||||
extern void ihipSetTlsDefaultCtx(ihipCtx_t *ctx);
|
||||
|
||||
extern ihipDevice_t *ihipGetDevice(int);
|
||||
ihipCtx_t * ihipGetPrimaryCtx(unsigned deviceIndex);
|
||||
|
||||
@@ -244,6 +244,8 @@ hipError_t hipSetDevice(int deviceId);
|
||||
* hipGetDevice returns in * @p device the default device for the calling host thread.
|
||||
*
|
||||
* @see hipSetDevice, hipGetDevicesizeBytes
|
||||
*
|
||||
* @returns hipSuccess, hipErrorInvalidDevice
|
||||
*/
|
||||
hipError_t hipGetDevice(int *deviceId);
|
||||
|
||||
@@ -1052,6 +1054,13 @@ hipError_t hipInit(unsigned int flags) ;
|
||||
hipError_t hipCtxCreate(hipCtx_t *ctx, unsigned int flags, hipDevice_t device);
|
||||
|
||||
|
||||
// TODO-ctx
|
||||
/**
|
||||
* @return hipSuccess, hipErrorInvalidDevice
|
||||
*/
|
||||
hipError_t hipDeviceGetFromId(hipDevice_t *device, int deviceId);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Returns the approximate HIP driver version.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user