pub struct CutlassInner {
pub plan_cache: Arc<PlanCache>,
pub compile_sink: Option<CompileSink>,
pub dispatched: Mutex<u64>,
}Expand description
Inner state of a CutlassActor.
Fields§
§plan_cache: Arc<PlanCache>§compile_sink: Option<CompileSink>Optional NVRTC-shaped sink: when present, the actor forwards
rendered .cu source to it for compilation. Left as a generic
Box<dyn Fn ...> so the cutlass crate doesn’t pull
atomr-accel-cuda::nvrtc into its compile graph when the
feature is off.
dispatched: Mutex<u64>Counter of dispatched messages — exposed for the
actor::tests::cutlass_msg_constructs test and for telemetry.
Implementations§
Source§impl CutlassInner
impl CutlassInner
pub fn new(plan_cache_capacity: usize) -> Self
Sourcepub fn dispatched(&self) -> u64
pub fn dispatched(&self) -> u64
Examples found in repository?
examples/cutlass_gemm_fp8.rs (line 27)
10fn main() {
11 let actor = CutlassActor::new(16);
12 let req = GemmRequest::<F8E4m3>::new(GemmShape::new(4096, 4096, 4096), SmArch::Sm90a)
13 .with_epilogue(GemmEpilogue::LinearReLU {
14 alpha: 1.0,
15 beta: 0.0,
16 });
17
18 println!("plan key: {:?}", req.plan_key());
19 let (src, name) = req.render_cu();
20 println!("kernel: {name}");
21 println!("--- generated .cu ---");
22 println!("{src}");
23
24 actor.handle(CutlassMsg::Gemm(Box::new(req.clone())));
25 actor.handle(CutlassMsg::Gemm(Box::new(req)));
26
27 println!("dispatched: {}", actor.inner().dispatched());
28 println!("plan cache len: {}", actor.inner().plan_cache.len());
29}Auto Trait Implementations§
impl !Freeze for CutlassInner
impl !RefUnwindSafe for CutlassInner
impl Send for CutlassInner
impl Sync for CutlassInner
impl Unpin for CutlassInner
impl UnsafeUnpin for CutlassInner
impl !UnwindSafe for CutlassInner
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