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
8    pub vulkan: VulkanCompilationOptions,
9}
10
11#[derive(Clone, Copy, Debug, Default)]
12pub struct VulkanCompilationOptions {
13    pub supports_fp_fast_math: bool,
14    pub supports_explicit_smem: bool,
15    pub supports_long_vectors: bool,
16    pub supports_arbitrary_bitwise: bool,
17    pub supports_uniform_standard_layout: bool,
18    pub supports_uniform_unsized_array: bool,
19
20    pub max_spirv_version: (u8, u8),
21    pub max_vector_size: usize,
22    pub push_constant_size: usize,
23}