Skip to content

Commit f6a4699

Browse files
authored
feat: Runtime enum (#1208)
* fix: Fix no_std, avoid future issues * Gate feature-specific imports * Make `cubecl-core` no_std * use core::sync::atomic instead of portable_atomic * Enable std for tests by default * Proper fix for exported tests * Use normal `Option` for `CubeOption` * Implement if let * Implement more `Options` methods * Fix `unwrap_or_default` * Fix clippy * Fix `is_none` * Fix `as_ref` name * WIP * Add `IntoRuntime` derive * Implement `Assign` * Implement `Branch::Unreachable` * Add wildcard support * Move match detection into parse file * Fixes and workarounds * Implement runtime `Option` * Fixes * Implement runtime if let * Implement `derive_expand` * Use signed discriminant, clean up runtime option * Require `ScalarArgSettings` for `Numeric` * Fix `trailing_zeros` on Vulkan * Fix liveness analysis ordering * Add runtime enums to book * Fixes * Ignore tests on unstable option methods * Fix `ExpandElementAssign` * Fixes * Format * Normalize usize ranges * Fix clippy and u64 indexing on Vulkan * Fix read on dummy server
1 parent cb7218b commit f6a4699

91 files changed

Lines changed: 5132 additions & 1069 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/cubecl-common/src/device/handle/tests_recursive.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#[test]
22
#[should_panic]
3+
#[allow(clippy::all)]
34
fn test_recursive_execution_same_state() {
45
let device_id = DeviceId {
56
type_id: 10,

crates/cubecl-core/src/frontend/barrier.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ impl CubePrimitive for Barrier {
3838
}
3939
}
4040

41-
impl ExpandElementIntoMut for Barrier {
42-
fn elem_into_mut(_scope: &mut Scope, elem: ExpandElement) -> ExpandElement {
41+
impl ExpandElementAssign for Barrier {
42+
fn elem_init_mut(_scope: &mut Scope, elem: ExpandElement) -> ExpandElement {
4343
elem
4444
}
4545
}
@@ -48,8 +48,8 @@ impl CubeType for BarrierToken {
4848
type ExpandType = ExpandElementTyped<BarrierToken>;
4949
}
5050

51-
impl ExpandElementIntoMut for BarrierToken {
52-
fn elem_into_mut(_scope: &mut crate::ir::Scope, elem: ExpandElement) -> ExpandElement {
51+
impl ExpandElementAssign for BarrierToken {
52+
fn elem_init_mut(_scope: &mut crate::ir::Scope, elem: ExpandElement) -> ExpandElement {
5353
elem
5454
}
5555
}

0 commit comments

Comments
 (0)