diff --git a/hipamd/api/hip/hip_device_runtime.cpp b/hipamd/api/hip/hip_device_runtime.cpp index d0d9c1145b..effce5974f 100644 --- a/hipamd/api/hip/hip_device_runtime.cpp +++ b/hipamd/api/hip/hip_device_runtime.cpp @@ -349,9 +349,9 @@ hipError_t hipDeviceGetStreamPriorityRange ( int* leastPriority, int* greatestPr hipError_t hipDeviceReset ( void ) { HIP_INIT_API(); - assert(0 && "Unimplemented"); + /* FIXME */ - return hipErrorUnknown; + return hipSuccess; } hipError_t hipDeviceSetCacheConfig ( hipFuncCache_t cacheConfig ) { @@ -429,13 +429,21 @@ hipError_t hipSetDevice ( int device ) { return hipSuccess; } - return hipErrorInvalidValue; + return hipErrorInvalidDevice; } hipError_t hipSetDeviceFlags ( unsigned int flags ) { HIP_INIT_API(flags); - assert(0 && "Unimplemented"); + /* FIXME */ + /* Not all of Ctx may be implemented */ + + unsigned supportedFlags = + hipDeviceScheduleMask | hipDeviceMapHost | hipDeviceLmemResizeToMax; + + if (flags & (~supportedFlags)) { + return hipErrorInvalidValue; + } return hipSuccess; } diff --git a/hipamd/api/hip/hip_platform.cpp b/hipamd/api/hip/hip_platform.cpp index d66bf0930c..a9c52bac2e 100644 --- a/hipamd/api/hip/hip_platform.cpp +++ b/hipamd/api/hip/hip_platform.cpp @@ -272,6 +272,8 @@ void hipLaunchKernelGGLImpl( uint32_t sharedMemBytes, hipStream_t stream, void** kernarg) { + + assert(0 && "Unimplemented"); } }