SWDEV-216213 - Use different static & dynamic module maps for faster lookup.
Change-Id: Ia605e76a411ad5be04046b9d61f1ac111d49bb4a
[ROCm/clr commit: 7356a74d35]
Tento commit je obsažen v:
odevzdal
Karthik Jayaprakash
rodič
8b0fec4333
revize
bce2b56ea0
@@ -160,27 +160,15 @@ inline bool ihipModuleRegisterFunc(amd::Program* program, hipModule_t* module) {
|
||||
device::Program* dev_program
|
||||
= program->getDeviceProgram(*hip::getCurrentDevice()->devices()[0]);
|
||||
|
||||
|
||||
// Get all the global func names from COMGR
|
||||
if (!dev_program->getGlobalFuncFromCodeObj(&func_names)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto it = func_names.begin(); it != func_names.end(); ++it) {
|
||||
auto modules = new std::vector<std::pair<hipModule_t, bool> >(g_devices.size());
|
||||
for (size_t dev = 0; dev < g_devices.size(); ++dev) {
|
||||
modules->at(dev) = std::make_pair(*module, true);
|
||||
}
|
||||
|
||||
// Create a new pointer, since the hostFunction* wont be available
|
||||
// if device code not in the same file as host code.
|
||||
PlatformState::DeviceFunction dfunc{*it, modules, std::vector<hipFunction_t>{ g_devices.size() }, true};
|
||||
PlatformState::instance().registerFunction(new std::string(it->c_str()), dfunc);
|
||||
}
|
||||
|
||||
return true;
|
||||
return PlatformState::instance().registerModFuncs(func_names, module);
|
||||
}
|
||||
|
||||
|
||||
inline bool ihipModuleRegisterGlobal(amd::Program* program, hipModule_t* module) {
|
||||
|
||||
size_t var_size = 0;
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele