Introduce ihipModuleGetGlobal

Bu işleme şunda yer alıyor:
Michael Kuron
2018-11-06 09:54:34 +01:00
ebeveyn 8049cdafab
işleme 4da2d92281
3 değiştirilmiş dosya ile 14 ekleme ve 6 silme
+3 -3
Dosyayı Görüntüle
@@ -953,7 +953,7 @@ inline hipDeviceptr_t agent_address_for_symbol(const char* symbolName) {
#if __hcc_workweek__ >= 17481
size_t byte_cnt = 0u;
hipModuleGetGlobal(&r, &byte_cnt, 0, symbolName);
ihipModuleGetGlobal(&r, &byte_cnt, 0, symbolName);
#else
auto ctx = ihipGetTlsDefaultCtx();
auto acc = ctx->getDevice()->_acc;
@@ -1104,7 +1104,7 @@ hipError_t hipGetSymbolAddress(void** devPtr, const void* symbolName) {
HIP_INIT_SPECIAL_API((TRACE_MCMD), devPtr, symbolName);
size_t size = 0;
return hipModuleGetGlobal(devPtr, &size, 0, static_cast<const char*>(symbolName));
return ihipModuleGetGlobal(devPtr, &size, 0, static_cast<const char*>(symbolName));
}
@@ -1112,7 +1112,7 @@ hipError_t hipGetSymbolSize(size_t* size, const void* symbolName) {
HIP_INIT_SPECIAL_API((TRACE_MCMD), size, symbolName);
void* devPtr = nullptr;
return hipModuleGetGlobal(&devPtr, size, 0, static_cast<const char*>(symbolName));
return ihipModuleGetGlobal(&devPtr, size, 0, static_cast<const char*>(symbolName));
}
+8 -3
Dosyayı Görüntüle
@@ -463,14 +463,19 @@ hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t h
const char* name) {
HIP_INIT_API(dptr, bytes, hmod, name);
if (!dptr || !bytes) return ihipLogStatus(hipErrorInvalidValue);
return ihipLogStatus(ihipModuleGetGlobal(dptr, bytes, hmod, name));
}
if (!name) return ihipLogStatus(hipErrorNotInitialized);
hipError_t ihipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod,
const char* name) {
if (!dptr || !bytes) return hipErrorInvalidValue;
if (!name) return hipErrorNotInitialized;
const auto r = hmod ? read_agent_global_from_module(dptr, bytes, hmod, name)
: read_agent_global_from_process(dptr, bytes, name);
return ihipLogStatus(r);
return r;
}
namespace