From 6a3443526718601131dab51ad16d8b2175bfcdee Mon Sep 17 00:00:00 2001 From: Sam Crater Date: Mon, 17 Aug 2026 12:54:46 -0500 Subject: [PATCH] fix cycle interval clamp applying to microsecond interval --- .../lib/rocprofiler-sdk/pc_sampling/ioctl/ioctl_adapter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/pc_sampling/ioctl/ioctl_adapter.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/pc_sampling/ioctl/ioctl_adapter.cpp index 8e89e72dc295..7715c950b36c 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/pc_sampling/ioctl/ioctl_adapter.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/pc_sampling/ioctl/ioctl_adapter.cpp @@ -463,7 +463,11 @@ convert_ioctl_pcs_config_to_rocp(const rocprofiler_ioctl_pc_sampling_info_t& ioc // No one configured PC sampling on the corresponding device. // Read the values of min and max interval provided by the KFD rocp_pcs_config.min_interval = ioctl_pcs_config.interval_min; - rocp_pcs_config.max_interval = std::min(ioctl_pcs_config.interval_max, 1ul << 20); + rocp_pcs_config.max_interval = ioctl_pcs_config.interval_max; + if(rocp_pcs_config.unit == ROCPROFILER_PC_SAMPLING_UNIT_CYCLES) + { + rocp_pcs_config.max_interval = std::min(rocp_pcs_config.max_interval, 1ul << 20); + } } rocp_pcs_config.flags = ioctl_pcs_config.flags;