ROCR-Runtime icon indicating copy to clipboard operation
ROCR-Runtime copied to clipboard

`HSA_AMD_AGENT_INFO_CACHELINE_SIZE` always gives 64

Open bertwesarg opened this issue 1 year ago • 1 comments

The code to handle HSA_AMD_AGENT_INFO_CACHELINE_SIZE always goes through the fallback, as the break instruction inside the for-loop does not break the switch case:

https://github.com/RadeonOpenCompute/ROCR-Runtime/blob/e0fadddb3175cb95ce9e9af2ebd2a205045e854e/src/core/runtime/amd_gpu_agent.cpp#L1091

    case HSA_AMD_AGENT_INFO_CACHELINE_SIZE:
      for (auto& cache : cache_props_) {
        if ((cache.CacheLevel == 2) && (cache.CacheLineSize != 0)) {
          *((uint32_t*)value) = cache.CacheLineSize;
          break;
        }
      }
      // Fallback for when KFD is returning zero.
      *((uint32_t*)value) = 64;
      break;

bertwesarg avatar Aug 31 '23 07:08 bertwesarg

Thank you! Fix will be included in ROCm-6.0 release

dayatsin-amd avatar Aug 31 '23 13:08 dayatsin-amd