rocr:Only set asan flag on GPU agents

Этот коммит содержится в:
David Yat Sin
2025-02-19 18:44:56 +00:00
коммит произвёл Yat Sin, David
родитель 9a950ab788
Коммит 3944da1d76
+2 -1
Просмотреть файл
@@ -834,7 +834,8 @@ hsa_status_t hsa_amd_memory_pool_allocate(hsa_amd_memory_pool_t memory_pool, siz
alloc_flag |= core::MemoryRegion::AllocateExecutable;
#ifdef SANITIZER_AMDGPU
alloc_flag |= core::MemoryRegion::AllocateAsan;
if (mem_region->owner()->device_type() == core::Agent::kAmdGpuDevice)
alloc_flag |= core::MemoryRegion::AllocateAsan;
#endif
return core::Runtime::runtime_singleton_->AllocateMemory(mem_region, size, alloc_flag, ptr);