pub struct KernelAttributes {
pub max_threads_per_block: u32,
pub num_regs: u32,
pub static_shared_bytes: u32,
pub local_bytes: u32,
}Expand description
Per-kernel resource usage, as reported by the JIT for a compiled kernel.
These are properties of the cubin the driver actually produced — not of the PTX we emitted — which is why they can only be read back after a module load.
Fields§
§max_threads_per_block: u32Largest block size this kernel can be launched with (CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK).
num_regs: u32Registers used per thread (CU_FUNC_ATTRIBUTE_NUM_REGS).
Statically declared shared memory, bytes (CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES).
local_bytes: u32Per-thread local memory, bytes (CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES). Non-zero means
the kernel spilled registers to local memory — legal, but a performance cliff.
Trait Implementations§
Source§impl Clone for KernelAttributes
impl Clone for KernelAttributes
Source§fn clone(&self) -> KernelAttributes
fn clone(&self) -> KernelAttributes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KernelAttributes
Source§impl Debug for KernelAttributes
impl Debug for KernelAttributes
impl Eq for KernelAttributes
Source§impl PartialEq for KernelAttributes
impl PartialEq for KernelAttributes
impl StructuralPartialEq for KernelAttributes
Auto Trait Implementations§
impl Freeze for KernelAttributes
impl RefUnwindSafe for KernelAttributes
impl Send for KernelAttributes
impl Sync for KernelAttributes
impl Unpin for KernelAttributes
impl UnsafeUnpin for KernelAttributes
impl UnwindSafe for KernelAttributes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more