Module test correction and hipModuleUnload API
- Corrected the hipModule.cpp test to minimal code
- Added hipModuleUnload API
- Added hipModuleUnload API test
Change-Id: I9c40337043d7972a570b795e1bfc104bd2c4d8aa
[ROCm/hip commit: 2287af23a1]
Αυτή η υποβολή περιλαμβάνεται σε:
1 γονέας
6562018204
υποβολή
6842171207
4 files changed
+65
-188
No files matched your search
@@ -116,6 +116,19 @@ hipError_t hipModuleLoad(hipModule *module, const char *fname){
|
||||
return ret;
|
||||
}
|
||||
|
||||
hipError_t hipModuleUnload(hipModule hmod){
|
||||
hsa_executable_t exec;
|
||||
hsa_code_object_t co;
|
||||
hipError_t ret = hipSuccess;
|
||||
exec.handle = hmod.executable;
|
||||
co.handle = hmod.object;
|
||||
hsa_status_t status = hsa_executable_destroy(exec);
|
||||
if(status != HSA_STATUS_SUCCESS){ret = hipErrorInvalidValue; }
|
||||
status = hsa_code_object_destroy(co);
|
||||
if(status != HSA_STATUS_SUCCESS){ret = hipErrorInvalidValue; }
|
||||
return ret;
|
||||
}
|
||||
|
||||
hipError_t hipModuleGetFunction(hipFunction *func, hipModule hmod, const char *name){
|
||||
HIP_INIT_API(name);
|
||||
auto ctx = ihipGetTlsDefaultCtx();
|
||||
|
||||
Reference in new issue
Block a user