Skip to content

Commit

Permalink
enable the use of config file options
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekt3421 committed Aug 27, 2024
1 parent 90a566c commit 3a676f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,10 +1477,8 @@ cvk_create_command_queue(cl_context context, cl_device_id device,
}

cl_int err = CL_SUCCESS;
std::string oooe_env_var = "CLVK_IGNORE_OUT_OF_ORDER_EXECUTION";
const char* oooe_env_var_val = getenv(oooe_env_var.c_str());

if (oooe_env_var_val == nullptr || strcmp(oooe_env_var_val, "1") != 0) {
if (!config.ignore_out_of_order_execution.set ||
config.ignore_out_of_order_execution.value == 0) {
// We do not support out of order command queues so this must fail
if (properties & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE &&
!out_of_order_device_support(device, err)) {
Expand Down
1 change: 1 addition & 0 deletions src/config.def
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ OPTION(uint32_t, max_cmd_batch_size, 10000u)
OPTION(uint32_t, max_first_cmd_batch_size, 10000u)
OPTION(uint32_t, max_cmd_group_size, UINT32_MAX)
OPTION(uint32_t, max_first_cmd_group_size, UINT32_MAX)
OPTION(uint32_t, ignore_out_of_order_execution, 0u) // 0 meaning dont ignore

// experimental
OPTION(bool, dynamic_batches, false)
Expand Down

0 comments on commit 3a676f4

Please sign in to comment.