Skip to content

Commit 4a707ec

Browse files
committed
Exclude HIP and MUSA
1 parent a33e305 commit 4a707ec

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ static ggml_cuda_device_info ggml_cuda_init() {
207207
#endif // GGML_CUDA_FORCE_CUBLAS
208208
GGML_LOG_INFO("%s: found %d " GGML_CUDA_NAME " devices:\n", __func__, info.device_count);
209209

210-
bool is_cc121 = false;
211210
std::vector<std::pair<int, std::string>> turing_devices_without_mma;
212211
for (int id = 0; id < info.device_count; ++id) {
213212
int device_vmm = 0;
@@ -230,8 +229,6 @@ static ggml_cuda_device_info ggml_cuda_init() {
230229
cudaDeviceProp prop;
231230
CUDA_CHECK(cudaGetDeviceProperties(&prop, id));
232231

233-
is_cc121 |= prop.major == 12 && prop.minor == 1;
234-
235232
info.default_tensor_split[id] = total_vram;
236233
total_vram += prop.totalGlobalMem;
237234
info.devices[id].integrated = false; // Temporarily disabled due to issues with corrupted output (e.g. #15034)
@@ -277,6 +274,15 @@ static ggml_cuda_device_info ggml_cuda_init() {
277274
turing_devices_without_mma.push_back({ id, device_name });
278275
}
279276

277+
278+
// Temporary performance fix:
279+
// Setting device scheduling strategy for iGPUs with cc121 to "spinning" to avoid delays in cuda synchronize calls.
280+
// TODO: Check for future drivers the default scheduling strategy and
281+
// remove this call again when cudaDeviceScheduleSpin is default.
282+
if (prop.major == 12 && prop.minor == 1) {
283+
CUDA_CHECK(cudaSetDeviceFlags(cudaDeviceScheduleSpin));
284+
}
285+
280286
#endif // defined(GGML_USE_HIP)
281287
}
282288

@@ -297,12 +303,6 @@ static ggml_cuda_device_info ggml_cuda_init() {
297303
// configure logging to stdout
298304
// CUBLAS_CHECK(cublasLoggerConfigure(1, 1, 0, nullptr));
299305

300-
// Setting device scheduling strategy for iGPUs to "spinning" to avoid delays in cuda synchronize calls.
301-
// This fix is temporary, as the strategy will be the default in later drivers.
302-
if (is_cc121) {
303-
CUDA_CHECK(cudaSetDeviceFlags(cudaDeviceScheduleSpin));
304-
}
305-
306306
return info;
307307
}
308308

0 commit comments

Comments
 (0)