fix a bug when initializing a vector of hipFunction_t (#1949)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
899c878703
Коммит
7c8b8d24ef
@@ -50,7 +50,7 @@ __hipRegisterFatBinary(const void* data)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto modules = new std::vector<hipModule_t>{g_deviceCnt};
|
||||
auto modules = new std::vector<hipModule_t>(g_deviceCnt);
|
||||
if (!modules) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ extern "C" void __hipRegisterFunction(
|
||||
int* wSize)
|
||||
{
|
||||
HIP_INIT_API(NONE, modules, hostFunction, deviceFunction, deviceName);
|
||||
std::vector<hipFunction_t> functions{g_deviceCnt};
|
||||
std::vector<hipFunction_t> functions(g_deviceCnt);
|
||||
|
||||
assert(modules && modules->size() >= g_deviceCnt);
|
||||
for (int deviceId = 0; deviceId < g_deviceCnt; ++deviceId) {
|
||||
|
||||
Ссылка в новой задаче
Block a user