P4 to Git Change 1590010 by skudchad@skudchad_test2_win_opencl on 2018/08/06 21:18:48
SWDEV-145570 - [HIP] - Fix some issues in hip runtime
- Set stream for event
- Free mem needs to be reported in bytes but runtime backends reports in Kb
ReviewBoardURL = http://ocltc.amd.com/reviews/r/15586/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#40 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#15 edit
[ROCm/hip commit: c708d8b16b]
This commit is contained in:
@@ -281,7 +281,7 @@ hipError_t hipMemGetInfo(size_t* free, size_t* total) {
|
|||||||
return hipErrorInvalidValue;
|
return hipErrorInvalidValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
*free = freeMemory[0];
|
*free = freeMemory[0] * Ki;
|
||||||
*total = device->info().globalMemSize_;
|
*total = device->info().globalMemSize_;
|
||||||
|
|
||||||
return hipSuccess;
|
return hipSuccess;
|
||||||
|
|||||||
@@ -198,6 +198,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(startEvent != nullptr) {
|
if(startEvent != nullptr) {
|
||||||
|
eStart->stream_ = queue;
|
||||||
amd::Command* startCommand = new hip::TimerMarker(*eStart->stream_);
|
amd::Command* startCommand = new hip::TimerMarker(*eStart->stream_);
|
||||||
startCommand->enqueue();
|
startCommand->enqueue();
|
||||||
|
|
||||||
@@ -225,6 +226,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
|||||||
if (eStop->event_ != nullptr) {
|
if (eStop->event_ != nullptr) {
|
||||||
eStop->event_->release();
|
eStop->event_->release();
|
||||||
}
|
}
|
||||||
|
eStop->stream_ = queue;
|
||||||
eStop->event_ = &command->event();
|
eStop->event_ = &command->event();
|
||||||
command->retain();
|
command->retain();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user