Skip to content

Commit cd69ae0

Browse files
committed
Perftest: disable Scatter2CQE with gpudirect send_lat
mlx5 driver enables SCATETR2CQE feature by default – up to 64B payloads. Meaning, messages that are up-to 64B, can be scattered to CQE on the responder side. Peer memory in general, and specifically here with GPUDirect enabled doesn’t work with this feature, and it must be disabled. Signed-off-by: Shmuel Shaul <[email protected]>
1 parent 9600494 commit cd69ae0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/perftest_parameters.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,21 @@ int check_intense_polling(struct perftest_parameters *user_param){
11531153
return OFF;
11541154
}
11551155

1156+
/******************************************************************************
1157+
*
1158+
******************************************************************************/
1159+
int disable_mlx5_scatter_to_cqe() {
1160+
const char *var_name = "MLX5_SCATTER_TO_CQE";
1161+
const char *var_value = "0";
1162+
1163+
if (setenv(var_name, var_value, 1)) {
1164+
fprintf(stderr,"Failed to set environment variable\n");
1165+
return FAILURE;
1166+
}
1167+
1168+
return SUCCESS;
1169+
}
1170+
11561171
/******************************************************************************
11571172
*
11581173
******************************************************************************/
@@ -1897,6 +1912,13 @@ static void force_dependecies(struct perftest_parameters *user_param)
18971912
exit(1);
18981913
}
18991914

1915+
if (user_param->memory_type == MEMORY_CUDA && user_param->verb == SEND && (user_param->size <= 64 || user_param->test_method == RUN_ALL)) {
1916+
printf(RESULT_LINE);
1917+
printf("Scatter2CQE (size <= 64) is not supported with GPUDirect send tests: setting MLX5_SCATTER_TO_CQE=0\n");
1918+
if (disable_mlx5_scatter_to_cqe())
1919+
exit(1);
1920+
}
1921+
19001922
if (user_param->memory_type == MEMORY_CUDA && (int)user_param->size <= user_param->inline_size) {
19011923
printf(RESULT_LINE);
19021924
fprintf(stderr,"Perftest doesn't support CUDA tests with inline messages\n");

0 commit comments

Comments
 (0)