Skip to main content

ProfileTarget

Enum ProfileTarget 

Source
pub enum ProfileTarget {
Show 14 variants Kernel { name: String, size: u32, roofline: bool, metrics: Option<String>, }, Cublas { op: String, size: u32, }, Wgpu { shader: String, dispatch: Option<String>, target: Option<String>, }, Metal { shader: String, dispatch: Option<u32>, }, Simd { function: String, size: u32, arch: String, }, Wasm { function: String, size: u32, }, Quant { kernel: Option<String>, size: Option<String>, all: bool, }, Scalar { function: String, size: u32, }, Parallel { function: String, size: u32, threads: Option<String>, }, Compare { kernel: String, size: u32, backends: Vec<String>, }, Scaling { size: u32, max_threads: Option<usize>, runs: usize, }, Binary { path: String, kernel_filter: Option<String>, trace: bool, duration: Option<String>, }, Python { args: Vec<String>, }, Library { so: String, symbol: String, args: Option<String>, },
}
Expand description

Targets accepted by cgp profile.

Variants§

§

Kernel

Profile a CUDA PTX kernel via ncu + CUPTI

Fields

§name: String

Kernel name

§size: u32

Problem size (e.g., 512 for square matrix)

§roofline: bool

Generate roofline overlay

§metrics: Option<String>

Specific ncu metrics to collect

§

Cublas

Profile cuBLAS/cuBLASLt operations

Fields

§op: String

Operation (gemm_f16, gemm_f32, etc.)

§size: u32

Problem size

§

Wgpu

Profile wgpu compute shaders

Fields

§shader: String

WGSL shader path

§dispatch: Option<String>

Dispatch dimensions (e.g., 256,256,1)

§target: Option<String>

Target (native or web)

§

Metal

Profile Apple Metal compute kernels

Fields

§shader: String

Metal shader name

§dispatch: Option<u32>

Dispatch size

§

Simd

Profile CPU SIMD functions

Fields

§function: String

Function name

§size: u32

Problem size

§arch: String

Target architecture (avx2, avx512, neon, sse2)

§

Wasm

Profile WASM SIMD128 via wasmtime

Fields

§function: String

Function name

§size: u32

Problem size

§

Quant

Profile quantized CPU kernels (Q4K/Q6K)

Fields

§kernel: Option<String>

Kernel name (q4k_gemv, q6k_gemv, q5k_gemv, q8_gemv, nf4_gemv)

§size: Option<String>

Dimensions (MxNxK format)

§all: bool

Profile all standard LLM layer sizes (ffn_up, ffn_down, attn_qkv, generic_4K)

§

Scalar

Profile scalar baseline

Fields

§function: String

Function name

§size: u32

Problem size

§

Parallel

Profile Rayon parallel workloads

Fields

§function: String

Function name

§size: u32

Problem size

§threads: Option<String>

Thread count (or “auto”)

§

Compare

Cross-backend comparison

Fields

§kernel: String

Kernel name

§size: u32

Problem size

§backends: Vec<String>

Backends to compare (comma-separated)

#2583: this was a free-form String, split on , and matched in analysis::compare::measure_backend, whose other => arm warns to stderr and continues. So --backends avx2,cudaa exited 0 and printed a comparison table silently missing the CUDA row — and under --json the omitted row is the only signal. Rejecting the typo at parse time is the same fix apr serve run --backend got.

§

Scaling

Parallel scaling sweep (thread count vs throughput)

Fields

§size: u32

Problem size

§max_threads: Option<usize>

Max threads to test (default: num_cpus)

§runs: usize

Runs per thread count for min-of-N timing

§

Binary

Profile an arbitrary binary

Fields

§path: String

Binary path

§kernel_filter: Option<String>

Kernel name filter

§trace: bool

Enable system trace

§duration: Option<String>

Trace duration

§

Python

Profile a Python script

Fields

§args: Vec<String>

Arguments after –

§

Library

Profile a shared library function

Fields

§so: String

Path to .so file

§symbol: String

Symbol name

§args: Option<String>

Arguments (key=value pairs)

Trait Implementations§

Source§

impl Clone for ProfileTarget

Source§

fn clone(&self) -> ProfileTarget

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 Debug for ProfileTarget

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for ProfileTarget

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for ProfileTarget

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.