Skip to main content

cubecl_core/codegen/
compiler.rs

1// We cannot put this struct in cubecl-wgpu crate due to circular dependencies.
2#[derive(Clone, Copy, Debug, Default)]
3pub struct WgpuCompilationOptions {
4    pub supports_u64: bool,
5    /// Whether the Vulkan compiler is supported or we need to fall back to WGSL
6    pub supports_vulkan_compiler: bool,
7    pub supports_msl_compiler: bool,
8
9    pub vulkan: VulkanCompilationOptions,
10}
11
12#[derive(Clone, Copy, Debug, Default)]
13pub struct VulkanCompilationOptions {
14    pub supports_fp_fast_math: bool,
15    pub supports_explicit_smem: bool,
16    pub supports_long_vectors: bool,
17    pub supports_arbitrary_bitwise: bool,
18    pub supports_uniform_standard_layout: bool,
19    pub supports_uniform_unsized_array: bool,
20    pub supports_float8: bool,
21
22    pub max_spirv_version: (u8, u8),
23    pub max_vector_size: usize,
24    pub push_constant_size: usize,
25}