fix a bug when initializing a vector of hipFunction_t (#1949)
[ROCm/hip commit: 7c8b8d24ef]
Este commit está contenido en:
@@ -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) {
|
||||
|
||||
Referencia en una nueva incidencia
Block a user