Skip to main content

OptionsBuilder

Struct OptionsBuilder 

Source
pub struct OptionsBuilder { /* private fields */ }
Expand description

Builder for Options.

Implementations§

Source§

impl OptionsBuilder

Source

pub fn allow_expensive_optimizations(&mut self, value: bool) -> &mut Self

--allow-expensive-optimizations.

Source

pub fn compile_as_tools_patch(&mut self, value: bool) -> &mut Self

--compile-as-tools-patch.

Source

pub fn compile_only(&mut self, value: bool) -> &mut Self

--compile-only.

Source

pub fn def_load_cache(&mut self, value: bool) -> &mut Self

--def-load-cache.

Source

pub fn def_store_cache(&mut self, value: bool) -> &mut Self

--def-store-cache.

Source

pub fn device_debug(&mut self, value: bool) -> &mut Self

--device-debug.

Source

pub fn device_function_maxrregcount(&mut self, value: Option<u32>) -> &mut Self

--device-function-maxrregcount.

Source

pub fn disable_optimizer_constants(&mut self, value: bool) -> &mut Self

--disable-optimizer-constants.

Source

pub fn disable_warnings(&mut self, value: bool) -> &mut Self

--disable-warnings.

Source

pub fn dont_merge_basicblocks(&mut self, value: bool) -> &mut Self

--dont-merge-basicblocks.

Source

pub fn entry(&mut self, value: String) -> &mut Self

--entry: the kernel entry point name.

Source

pub fn extensible_whole_program(&mut self, value: bool) -> &mut Self

--extensible-whole-program.

Source

pub fn fmad(&mut self, value: bool) -> &mut Self

--fmad: enable fused multiply-add contraction.

Source

pub fn force_load_cache(&mut self, value: bool) -> &mut Self

--force-load-cache.

Source

pub fn force_store_cache(&mut self, value: bool) -> &mut Self

--force-store-cache.

Source

pub fn generate_line_info(&mut self, value: bool) -> &mut Self

--generate-line-info.

Source

pub fn gpu_name(&mut self, value: Capability) -> &mut Self

--gpu-name: the target GPU’s compute capability.

Source

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).

Source

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.

Source

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-kernelsTritonLowering 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.

Source

pub fn maxrregcount(&mut self, value: Option<u32>) -> &mut Self

--maxrregcount (alias maxnreg in Options::parse’s string encoding).

Source

pub fn opt_level(&mut self, value: Option<OptLevel>) -> &mut Self

--opt-level.

Source

pub fn position_independent_code(&mut self, value: bool) -> &mut Self

--position-independent-code.

Source

pub fn preserve_relocs(&mut self, value: bool) -> &mut Self

--preserve-relocs.

Source

pub fn return_at_end(&mut self, value: bool) -> &mut Self

--return-at-end.

Source

pub fn sanitize(&mut self, value: Option<Sanitizer>) -> &mut Self

--sanitize.

Source

pub fn suppress_async_bulk_multicast_advisory_warning( &mut self, value: bool, ) -> &mut Self

--suppress-async-bulk-multicast-advisory-warning.

Source

pub fn suppress_stack_size_warning(&mut self, value: bool) -> &mut Self

--suppress-stack-size-warning.

Source

pub fn verbose(&mut self, value: bool) -> &mut Self

--verbose.

Source

pub fn warn_on_double_precision_use(&mut self, value: bool) -> &mut Self

--warn-on-double-precision-use.

Source

pub fn warn_on_local_memory_usage(&mut self, value: bool) -> &mut Self

--warn-on-local-memory-usage.

Source

pub fn warn_on_spills(&mut self, value: bool) -> &mut Self

--warn-on-spills.

Source

pub fn warning_as_error(&mut self, value: bool) -> &mut Self

--warning-as-error.

Source

pub fn maxntid(&mut self, value: Option<u32>) -> &mut Self

--maxntid.

Source

pub fn minnctapersm(&mut self, value: Option<u32>) -> &mut Self

--minnctapersm.

Source

pub fn override_directive_values(&mut self, value: bool) -> &mut Self

--override-directive-values.

Source

pub fn make_errors_visible_at_exit(&mut self, value: bool) -> &mut Self

--make-errors-visible-at-exit.

Source

pub fn ofast_compile(&mut self, value: Option<u32>) -> &mut Self

--oFast-compile.

Source

pub fn device_stack_protector(&mut self, value: bool) -> &mut Self

--device-stack-protector.

Source

pub fn g_tensor_memory_access_check(&mut self, value: bool) -> &mut Self

--g-tensor-memory-access-check.

Source

pub fn gno_tensor_memory_access_check(&mut self, value: bool) -> &mut Self

--gno-tensor-memory-access-check.

Source

pub fn split_compile(&mut self, value: Option<u32>) -> &mut Self

--split-compile.

Source

pub fn build(&self) -> Result<Options, OptionsBuilderError>

Builds a new Options.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for OptionsBuilder

Source§

fn clone(&self) -> OptionsBuilder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for OptionsBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more