Skip to content

Commit 0228337

Browse files
committed
Update rustc to handle mangled functions in offload_args, adjust test
1 parent 5470971 commit 0228337

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

compiler/rustc_monomorphize/src/collector/autodiff.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ pub(crate) fn collect_autodiff_fn<'tcx>(
1515
intrinsic: IntrinsicDef,
1616
output: &mut MonoItems<'tcx>,
1717
) {
18-
if intrinsic.name != rustc_span::sym::autodiff {
18+
if intrinsic.name != rustc_span::sym::autodiff
19+
&& intrinsic.name != rustc_span::sym::offload
20+
&& intrinsic.name != rustc_span::sym::offload_args
21+
{
1922
return;
2023
};
2124

tests/codegen-llvm/gpu_offload/offload_args.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
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)]
@@ -40,7 +39,6 @@ unsafe extern "C" {
4039
) -> i32;
4140
}
4241

43-
#[unsafe(no_mangle)]
4442
#[inline(never)]
4543
pub fn rocblas_sgemv_wrapper(A: &mut [f32; 6], x: &mut [f32; 3], y: &mut [f32; 2]) -> () {
4644
let m: i32 = 2;

0 commit comments

Comments
 (0)