cubecl_cpp/cuda/
arch.rs

1use std::fmt::Display;
2
3use crate::shared::Architecture;
4
5#[derive(Debug)]
6pub struct CudaArchitecture {
7    pub version: u32,
8}
9
10impl Display for CudaArchitecture {
11    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12        write!(f, "{}", self.version)
13    }
14}
15
16impl Architecture for CudaArchitecture {
17    fn warp_size(&self) -> u32 {
18        32
19    }
20
21    fn is_wmma_capable(&self) -> bool {
22        true
23    }
24
25    fn is_mfma_capable(&self) -> bool {
26        false
27    }
28
29    fn get_version(&self) -> u32 {
30        self.version
31    }
32}