@@ -7,7 +7,11 @@ use crate::{
77    compute:: { WgpuServer ,  WgpuStorage } , 
88    AutoGraphicsApi ,  GraphicsApi ,  Pdrc ,  WgpuDevice , 
99} ; 
10- use  cubecl_core:: { channel:: ComputeChannel ,  server:: ComputeServer ,  Feature ,  Runtime } ; 
10+ #[ cfg( not( all( target_arch = "wasm32" ,  target_feature = "atomics" ) ) ) ]  
11+ use  cubecl_core:: future; 
12+ #[ cfg( all( target_arch = "wasm32" ,  target_feature = "atomics" ) ) ]  
13+ use  cubecl_core:: { channel:: ComputeChannel ,  server:: ComputeServer } ; 
14+ use  cubecl_core:: { Feature ,  Runtime } ; 
1115#[ cfg( not( all( target_arch = "wasm32" ,  target_feature = "atomics" ) ) ) ]  
1216use  cubecl_runtime:: channel:: MutexComputeChannel ; 
1317use  cubecl_runtime:: { 
@@ -31,6 +35,7 @@ thread_local! {
3135    static  LOCAL_DEVICE :  RefCell <hashbrown:: HashMap <WgpuDevice ,  Rc <RefCell <Server >>>> = RefCell :: new( hashbrown:: HashMap :: default ( ) ) ; 
3236} 
3337
38+ #[ cfg( all( target_arch = "wasm32" ,  target_feature = "atomics" ) ) ]  
3439static  RUNTIME :  ComputeRuntime < WgpuDevice ,  Server ,  ThreadLocalChannel >  = ComputeRuntime :: new ( ) ; 
3540
3641/// The compute instance is shared across all [wgpu runtimes](WgpuRuntime). 
@@ -214,6 +219,7 @@ pub(crate) fn create_client_on_setup<C: WgpuCompiler>(
214219        memory_management, 
215220        setup. device . clone ( ) , 
216221        setup. queue , 
222+         setup. adapter . clone ( ) , 
217223        options. tasks_max , 
218224    ) ; 
219225    let  channel = MutexComputeChannel :: new ( server) ; 
0 commit comments