cubecl-wgpu 0.11.0-pre.4

WGPU runtime for the CubeCL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use cubecl_ir::dialect::synchronization::{SyncOp, SyncScope};

use crate::compiler::wgsl::to_wgsl::wgsl_op;

wgsl_op!(SyncOp, |op, ctx| {
    match op.scope(ctx).0 {
        SyncScope::Plane | SyncScope::Cube => "workgroupBarrier();\n".into(),
        // The storage half is all WGSL can say across workgroups, and the workgroup
        // barrier is the cube scope this one contains.
        SyncScope::Device => "storageBarrier();\nworkgroupBarrier();\n".into(),
        SyncScope::Unit => "".into(),
    }
});