(cherry picked from commit 94da229a7788d74685d1591a4e75a8341de64f41)

[ROCm/rccl commit: a7fcd58a97]
Этот коммит содержится в:
Wenkai Du
2023-07-21 07:31:27 -07:00
коммит произвёл GitHub
родитель f4b106ec94
Коммит dfda1d6fab
15 изменённых файлов: 159 добавлений и 56 удалений
+7 -1
Просмотреть файл
@@ -120,7 +120,13 @@ ncclResult_t NpKit::Dump(const std::string& dump_dir) {
dump_file_path = dump_dir;
dump_file_path += "/gpu_clock_rate_rank_";
dump_file_path += std::to_string(rank_);
constexpr int vega_gpu_rtc_freq_in_khz = 25000;
hipDeviceProp_t devProp;
int vega_gpu_rtc_freq_in_khz;
CUDACHECK(hipGetDeviceProperties(&devProp, 0));
if (devProp.gcnArch/10 == 94)
vega_gpu_rtc_freq_in_khz = 100000;
else
vega_gpu_rtc_freq_in_khz = 25000;
std::string clock_rate_str = std::to_string(vega_gpu_rtc_freq_in_khz);
auto gpu_clock_rate_file = std::fstream(dump_file_path, std::ios::out);
gpu_clock_rate_file.write(clock_rate_str.c_str(), clock_rate_str.length());