diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 50a319e480..15c038e40a 100644 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -1067,6 +1067,13 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { *((bool*)value) = properties_.Capability.ui32.CoherentHostAccess == 1; break; case HSA_AMD_AGENT_INFO_COOPERATIVE_COMPUTE_UNIT_COUNT: + if (core::Runtime::runtime_singleton_->flag().coop_cu_count() && + !(core::Runtime::runtime_singleton_->flag().cu_mask(enum_index_).empty())) { + debug_warning("Cooperative launch and CU masking are currently incompatible!"); + *((uint32_t*)value) = 0; + break; + } + if (core::Runtime::runtime_singleton_->flag().coop_cu_count() && (isa_->GetMajorVersion() == 9) && (isa_->GetMinorVersion() == 0) && (isa_->GetStepping() == 10)) {