diff --git a/docs/envvars.rst b/docs/envvars.rst index 4b7293be13b..0d3df8ac0a3 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -1154,6 +1154,7 @@ Rusticl environment variables - ``allow_invalid_spirv`` disables validation of any input SPIR-V - ``clc`` dumps all OpenCL C source being compiled - ``no_reuse_context`` pipe_contexts are not recycled + - ``no_variants`` disable kernel variants (e.g. specialized binaries for offsets == 0) - ``perf`` prints a warning when hitting slow paths once - ``perfspam`` same as perf, but doesn't skip same warnings - ``program`` dumps compilation logs to stderr diff --git a/src/gallium/frontends/rusticl/core/platform.rs b/src/gallium/frontends/rusticl/core/platform.rs index e034552f05b..0920227b039 100644 --- a/src/gallium/frontends/rusticl/core/platform.rs +++ b/src/gallium/frontends/rusticl/core/platform.rs @@ -30,9 +30,10 @@ pub enum PerfDebugLevel { pub struct PlatformDebug { pub allow_invalid_spirv: bool, pub clc: bool, + pub max_grid_size: u64, + pub no_variants: bool, pub perf: PerfDebugLevel, pub program: bool, - pub max_grid_size: u64, pub reuse_context: bool, pub sync_every_event: bool, pub validate_spirv: bool, @@ -78,9 +79,10 @@ static mut PLATFORM: Platform = Platform { static mut PLATFORM_DBG: PlatformDebug = PlatformDebug { allow_invalid_spirv: false, clc: false, + max_grid_size: 0, + no_variants: false, perf: PerfDebugLevel::None, program: false, - max_grid_size: 0, reuse_context: true, sync_every_event: false, validate_spirv: false, @@ -99,6 +101,7 @@ fn load_env() { "allow_invalid_spirv" => debug.allow_invalid_spirv = true, "clc" => debug.clc = true, "no_reuse_context" => debug.reuse_context = false, + "no_variants" => debug.no_variants = true, "perf" => debug.perf = PerfDebugLevel::Once, "perfspam" => debug.perf = PerfDebugLevel::Spam, "program" => debug.program = true,