Skip to content

Commit

Permalink
Hint users towards the possibilty of deriving CubeType and CubeLaunch…
Browse files Browse the repository at this point in the history
… if missing (#272)

Signed-off-by: Torstein Grindvik <[email protected]>
Co-authored-by: Torstein Grindvik <[email protected]>
  • Loading branch information
torsteingrindvik and Torstein Grindvik authored Nov 19, 2024
1 parent 5cec284 commit a4ea003
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/cubecl-core/src/frontend/element/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use std::{marker::PhantomData, num::NonZero};
/// This allows Cube code to not necessitate cloning, which is cumbersome
/// in algorithmic code. The necessary cloning will automatically appear in
/// the generated code.
#[diagnostic::on_unimplemented(note = "Consider using `#[derive(CubeType)]` on `{Self}`")]
pub trait CubeType {
type ExpandType: Clone + Init;

Expand Down Expand Up @@ -57,6 +58,7 @@ pub trait Init: Sized {
/// Once for the reference and the other for the mutable reference. Often time, the reference
/// should expand the argument as an input while the mutable reference should expand the argument
/// as an output.
#[diagnostic::on_unimplemented(note = "Consider using `#[derive(CubeLaunch)]` on `{Self}`")]
pub trait LaunchArgExpand: CubeType {
/// Compilation argument.
type CompilationArg: Clone
Expand Down

0 comments on commit a4ea003

Please sign in to comment.