77// neither want to deal with the creation or destruction of handles that those require since it's
88// just noise. We do however test that we can combine host pointer (like alpha, beta) with device
99// pointers (A, x, y). We also test std support while already at it.
10- // FIXME(offload): We should be able remove the no_mangle from the wrapper if we mark it as used.
1110
1211#![ allow( internal_features, non_camel_case_types, non_snake_case) ]
1312#![ feature( rustc_attrs) ]
@@ -24,7 +23,8 @@ fn main() {
2423 // CHECK-NEXT: [[A:%.*]] = call ptr @omp_get_mapped_ptr(ptr nonnull %A, i32 0)
2524 // CHECK-NEXT: [[X:%.*]] = call ptr @omp_get_mapped_ptr(ptr nonnull %x, i32 0)
2625 // CHECK-NEXT: [[Y:%.*]] = call ptr @omp_get_mapped_ptr(ptr nonnull %y, i32 0)
27- // CHECK-NEXT: call {{.*}}void @rocblas_sgemv_wrapper(ptr [[A]], ptr [[X]], ptr [[Y]])
26+ // CHECK-NEXT: ; call offload_args::rocblas_sgemv_wrapper
27+ // CHECK-NEXT: call {{.*}}void {{@_RNv.*rocblas_sgemv_wrapper.*}}(ptr [[A]], ptr [[X]], ptr [[Y]])
2828 // CHECK-NEXT: call void @__tgt_target_data_end_mapper(
2929 }
3030 println ! ( "{:?}" , y) ;
@@ -45,7 +45,6 @@ unsafe extern "C" {
4545 ) -> i32 ;
4646}
4747
48- #[ unsafe( no_mangle) ]
4948#[ inline( never) ]
5049pub fn rocblas_sgemv_wrapper ( A : & mut [ f32 ; 6 ] , x : & mut [ f32 ; 3 ] , y : & mut [ f32 ; 2 ] ) -> ( ) {
5150 let m: i32 = 2 ;
@@ -57,7 +56,8 @@ pub fn rocblas_sgemv_wrapper(A: &mut [f32; 6], x: &mut [f32; 3], y: &mut [f32; 2
5756 let alpha: f32 = 1.0 ;
5857 let beta: f32 = 1.0 ;
5958
60- // CHECK-LABEL: define {{.*}}void @rocblas_sgemv_wrapper(ptr{{.*}} %A, ptr{{.*}} %x, ptr{{.*}} %y)
59+ // CHECK-LABEL: ; offload_args::rocblas_sgemv_wrapper
60+ // CHECK: define {{.*}}void {{.*}}rocblas_sgemv_wrapper{{.*}}(ptr{{.*}} %A, ptr{{.*}} %x, ptr{{.*}} %y)
6161 // CHECK-DAG: %alpha = alloca [4 x i8]
6262 // CHECK-DAG: %beta = alloca [4 x i8]
6363 // CHECK-DAG: store float 1.000000e+00, ptr %alpha
0 commit comments