pub struct OptionsBuilder { /* private fields */ }Expand description
Builder for Options.
Implementations§
Source§impl OptionsBuilder
impl OptionsBuilder
Sourcepub fn allow_expensive_optimizations(&mut self, value: bool) -> &mut Self
pub fn allow_expensive_optimizations(&mut self, value: bool) -> &mut Self
--allow-expensive-optimizations.
Sourcepub fn compile_as_tools_patch(&mut self, value: bool) -> &mut Self
pub fn compile_as_tools_patch(&mut self, value: bool) -> &mut Self
--compile-as-tools-patch.
Sourcepub fn compile_only(&mut self, value: bool) -> &mut Self
pub fn compile_only(&mut self, value: bool) -> &mut Self
--compile-only.
Sourcepub fn def_load_cache(&mut self, value: bool) -> &mut Self
pub fn def_load_cache(&mut self, value: bool) -> &mut Self
--def-load-cache.
Sourcepub fn def_store_cache(&mut self, value: bool) -> &mut Self
pub fn def_store_cache(&mut self, value: bool) -> &mut Self
--def-store-cache.
Sourcepub fn device_debug(&mut self, value: bool) -> &mut Self
pub fn device_debug(&mut self, value: bool) -> &mut Self
--device-debug.
Sourcepub fn device_function_maxrregcount(&mut self, value: Option<u32>) -> &mut Self
pub fn device_function_maxrregcount(&mut self, value: Option<u32>) -> &mut Self
--device-function-maxrregcount.
Sourcepub fn disable_optimizer_constants(&mut self, value: bool) -> &mut Self
pub fn disable_optimizer_constants(&mut self, value: bool) -> &mut Self
--disable-optimizer-constants.
Sourcepub fn disable_warnings(&mut self, value: bool) -> &mut Self
pub fn disable_warnings(&mut self, value: bool) -> &mut Self
--disable-warnings.
Sourcepub fn dont_merge_basicblocks(&mut self, value: bool) -> &mut Self
pub fn dont_merge_basicblocks(&mut self, value: bool) -> &mut Self
--dont-merge-basicblocks.
Sourcepub fn extensible_whole_program(&mut self, value: bool) -> &mut Self
pub fn extensible_whole_program(&mut self, value: bool) -> &mut Self
--extensible-whole-program.
Sourcepub fn fmad(&mut self, value: bool) -> &mut Self
pub fn fmad(&mut self, value: bool) -> &mut Self
--fmad: enable fused multiply-add contraction.
Sourcepub fn force_load_cache(&mut self, value: bool) -> &mut Self
pub fn force_load_cache(&mut self, value: bool) -> &mut Self
--force-load-cache.
Sourcepub fn force_store_cache(&mut self, value: bool) -> &mut Self
pub fn force_store_cache(&mut self, value: bool) -> &mut Self
--force-store-cache.
Sourcepub fn generate_line_info(&mut self, value: bool) -> &mut Self
pub fn generate_line_info(&mut self, value: bool) -> &mut Self
--generate-line-info.
Sourcepub fn gpu_name(&mut self, value: Capability) -> &mut Self
pub fn gpu_name(&mut self, value: Capability) -> &mut Self
--gpu-name: the target GPU’s compute capability.
Sourcepub fn ptx_version(&mut self, value: Option<u32>) -> &mut Self
pub fn ptx_version(&mut self, value: Option<u32>) -> &mut Self
Explicit PTX ISA version to request from teenyc (e.g. 82 for
8.2), encoded as major*10 + minor. Not an nvptxcompiler flag —
excluded from Options::to_compile_options; consumed separately by
crate::compiler::aot::compile_graph to override teenyc’s
capability-based default when the deployment target’s exact CUDA
version is known (e.g. ptx-version=82 for a Jetson Orin Nano on
CUDA 12.2, since sm_87’s own default floor is conservative).
Sourcepub fn log_level(&mut self, value: Option<LogLevel>) -> &mut Self
pub fn log_level(&mut self, value: Option<LogLevel>) -> &mut Self
teenyc’s diagnostic verbosity (see LogLevel). Not an nvptxcompiler flag —
excluded from Options::to_compile_options; consumed by
crate::compiler::aot::compile_graph to set LlvmCompiler::with_log_level, which in
turn sets RUSTC_LOG on the teenyc subprocess. Leaving this unset (the default)
preserves teenyc’s own default verbosity and skips capturing any pipeline-stage IR.
Sourcepub fn sm_count(&mut self, value: Option<u32>) -> &mut Self
pub fn sm_count(&mut self, value: Option<u32>) -> &mut Self
Target device’s SM (streaming multiprocessor) count, for shape-adaptive kernel
tile-size selection. Not an nvptxcompiler flag — excluded from
Options::to_compile_options; consumed by teeny-kernels’ TritonLowering to
pick smaller tile sizes (larger grids) for conv layers whose default tile size
would otherwise launch too few thread blocks to occupy the target device (e.g.
deep layers with small spatial dims after repeated downsampling). Not auto-queried
from a live device: AOT compilation may target a device that isn’t the one doing
the compiling (e.g. cross-compiling for a Jetson from an x86 host), so this must be
supplied explicitly when known (e.g. sm-count=20 for a Jetson Orin Nano). Leaving
this unset (the default) preserves today’s fixed tile-size behavior unchanged.
Sourcepub fn maxrregcount(&mut self, value: Option<u32>) -> &mut Self
pub fn maxrregcount(&mut self, value: Option<u32>) -> &mut Self
--maxrregcount (alias maxnreg in Options::parse’s string encoding).
Sourcepub fn position_independent_code(&mut self, value: bool) -> &mut Self
pub fn position_independent_code(&mut self, value: bool) -> &mut Self
--position-independent-code.
Sourcepub fn preserve_relocs(&mut self, value: bool) -> &mut Self
pub fn preserve_relocs(&mut self, value: bool) -> &mut Self
--preserve-relocs.
Sourcepub fn return_at_end(&mut self, value: bool) -> &mut Self
pub fn return_at_end(&mut self, value: bool) -> &mut Self
--return-at-end.
Sourcepub fn suppress_async_bulk_multicast_advisory_warning(
&mut self,
value: bool,
) -> &mut Self
pub fn suppress_async_bulk_multicast_advisory_warning( &mut self, value: bool, ) -> &mut Self
--suppress-async-bulk-multicast-advisory-warning.
Sourcepub fn suppress_stack_size_warning(&mut self, value: bool) -> &mut Self
pub fn suppress_stack_size_warning(&mut self, value: bool) -> &mut Self
--suppress-stack-size-warning.
Sourcepub fn warn_on_double_precision_use(&mut self, value: bool) -> &mut Self
pub fn warn_on_double_precision_use(&mut self, value: bool) -> &mut Self
--warn-on-double-precision-use.
Sourcepub fn warn_on_local_memory_usage(&mut self, value: bool) -> &mut Self
pub fn warn_on_local_memory_usage(&mut self, value: bool) -> &mut Self
--warn-on-local-memory-usage.
Sourcepub fn warn_on_spills(&mut self, value: bool) -> &mut Self
pub fn warn_on_spills(&mut self, value: bool) -> &mut Self
--warn-on-spills.
Sourcepub fn warning_as_error(&mut self, value: bool) -> &mut Self
pub fn warning_as_error(&mut self, value: bool) -> &mut Self
--warning-as-error.
Sourcepub fn minnctapersm(&mut self, value: Option<u32>) -> &mut Self
pub fn minnctapersm(&mut self, value: Option<u32>) -> &mut Self
--minnctapersm.
Sourcepub fn override_directive_values(&mut self, value: bool) -> &mut Self
pub fn override_directive_values(&mut self, value: bool) -> &mut Self
--override-directive-values.
Sourcepub fn make_errors_visible_at_exit(&mut self, value: bool) -> &mut Self
pub fn make_errors_visible_at_exit(&mut self, value: bool) -> &mut Self
--make-errors-visible-at-exit.
Sourcepub fn ofast_compile(&mut self, value: Option<u32>) -> &mut Self
pub fn ofast_compile(&mut self, value: Option<u32>) -> &mut Self
--oFast-compile.
Sourcepub fn device_stack_protector(&mut self, value: bool) -> &mut Self
pub fn device_stack_protector(&mut self, value: bool) -> &mut Self
--device-stack-protector.
Sourcepub fn g_tensor_memory_access_check(&mut self, value: bool) -> &mut Self
pub fn g_tensor_memory_access_check(&mut self, value: bool) -> &mut Self
--g-tensor-memory-access-check.
Sourcepub fn gno_tensor_memory_access_check(&mut self, value: bool) -> &mut Self
pub fn gno_tensor_memory_access_check(&mut self, value: bool) -> &mut Self
--gno-tensor-memory-access-check.
Sourcepub fn split_compile(&mut self, value: Option<u32>) -> &mut Self
pub fn split_compile(&mut self, value: Option<u32>) -> &mut Self
--split-compile.
Trait Implementations§
Source§impl Clone for OptionsBuilder
impl Clone for OptionsBuilder
Source§fn clone(&self) -> OptionsBuilder
fn clone(&self) -> OptionsBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more