SWDEV-380792 - Fix floating point exception when maxEngineClockFrequency_ is 0

Change-Id: Ic443ceae586c4c84995ed2abef9bd7f32f8b60f9
이 커밋은 다음에 포함됨:
jatang 작성하고 Jason Tang가 2023-02-07 11:43:10 -05:00를 커밋함
1 부모 4435ddd997
커밋 b798c85272
2 파일이 변경됨
+7 -2

검색과 일치하는 파일 없음

+4 -1
파일 보기
@@ -2691,7 +2691,10 @@ bool KernelBlitManager::runScheduler(uint64_t vqVM, amd::Memory* schedulerParam,
sp->vqueue_header = vqVM;
sp->parentAQL = sp->kernarg_address + sizeof(SchedulerParam);
sp->eng_clk = (1000 * 1024) / dev().info().maxEngineClockFrequency_;
if (dev().info().maxEngineClockFrequency_ > 0) {
sp->eng_clk = (1000 * 1024) / dev().info().maxEngineClockFrequency_;
}
// Use a device side global atomics to workaround the reliance of PCIe 3 atomics
sp->write_index = hsa_queue_load_write_index_relaxed(schedulerQueue);
+3 -1
파일 보기
@@ -1147,7 +1147,9 @@ bool Device::populateOCLDeviceConstants() {
//TODO: add the assert statement for Raven
if (!(isa().versionMajor() == 9 && isa().versionMinor() == 0 && isa().versionStepping() == 2)) {
assert(info_.maxEngineClockFrequency_ > 0);
if (info_.maxEngineClockFrequency_ <= 0) {
LogError("maxEngineClockFrequency_ is NOT positive!");
}
}
if (HSA_STATUS_SUCCESS !=