File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -76,15 +76,15 @@ pub mod prelude {
76
76
} ;
77
77
}
78
78
79
- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
79
+ #[ cfg( target_arch = "nvptx64" ) ]
80
80
#[ alloc_error_handler]
81
81
fn alloc_handler ( layout : core:: alloc:: Layout ) -> ! {
82
82
core:: panic!( "Memory allocation of {} bytes failed" , layout. size( ) ) ;
83
83
}
84
84
85
85
// FIXME(RDambrosio016): For some very odd reason, this function causes an InvalidAddress error when called,
86
86
// despite it having no reason for doing that. It needs more debugging to see what is causing it exactly. For now we just trap.
87
- #[ cfg( any ( target_arch = "nvptx" , target_arch = " nvptx64") ) ]
87
+ #[ cfg( target_arch = "nvptx64" ) ]
88
88
#[ panic_handler]
89
89
fn panic ( _info : & core:: panic:: PanicInfo ) -> ! {
90
90
// use crate::prelude::*;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ pub fn kernel(input: proc_macro::TokenStream, item: proc_macro::TokenStream) ->
27
27
let mut item = parse_macro_input ! ( item as ItemFn ) ;
28
28
let no_mangle = parse_quote ! ( #[ no_mangle] ) ;
29
29
item. attrs . push ( no_mangle) ;
30
- let internal = parse_quote ! ( #[ cfg_attr( any ( target_arch="nvptx" , target_arch= " nvptx64") , nvvm_internal( kernel( #input) ) ) ] ) ;
30
+ let internal = parse_quote ! ( #[ cfg_attr( target_arch="nvptx64" , nvvm_internal( kernel( #input) ) ) ] ) ;
31
31
item. attrs . push ( internal) ;
32
32
33
33
// used to guarantee some things about how params are passed in the codegen.
@@ -170,13 +170,13 @@ pub fn gpu_only(_attr: proc_macro::TokenStream, item: proc_macro::TokenStream) -
170
170
} ;
171
171
172
172
let output = quote:: quote! {
173
- #[ cfg( not( any ( target_arch="nvptx" , target_arch= " nvptx64") ) ) ]
173
+ #[ cfg( not( target_arch="nvptx64" ) ) ]
174
174
#[ allow( unused_variables) ]
175
175
#( #cloned_attrs) * #vis #sig_cpu {
176
176
unimplemented!( concat!( "`" , stringify!( #fn_name) , "` can only be used on the GPU with rustc_codegen_nvvm" ) )
177
177
}
178
178
179
- #[ cfg( any ( target_arch="nvptx" , target_arch= " nvptx64") ) ]
179
+ #[ cfg( target_arch="nvptx64" ) ]
180
180
#( #attrs) * #vis #sig {
181
181
#block
182
182
}
You can’t perform that action at this time.
0 commit comments