Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
SWDEV-366636 - Init managed vars on device kernel is launched
Browse files Browse the repository at this point in the history
Change-Id: I9c30b7d0e2a490dbb2bd9c02dccaae17d76874ef
(cherry picked from commit 25aa096)
  • Loading branch information
Anusha GodavarthySurya authored and mangupta committed Nov 10, 2022
1 parent dbcca1d commit aaa1e3d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/hip_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
uint32_t numGrids = 0, uint64_t prevGridSum = 0,
uint64_t allGridSum = 0, uint32_t firstDevice = 0) {
int deviceId = hip::Stream::DeviceId(hStream);
for (size_t dev = 0; dev < g_devices.size(); ++dev) {
HIP_RETURN_ONFAIL(PlatformState::instance().initStatManagedVarDevicePtr(dev));
}
HIP_RETURN_ONFAIL(PlatformState::instance().initStatManagedVarDevicePtr(deviceId));

if (f == nullptr) {
LogPrintfError("%s", "Function passed is null");
Expand Down

0 comments on commit aaa1e3d

Please sign in to comment.