[flang-commits] [flang] acba822 - [CUF] Moving __fadd_rd and __fadd_ru to cudadevice.f90 as they are symbol already known upstream. (#123127)
via flang-commits
flang-commits at lists.llvm.org
Thu Jan 16 11:53:21 PST 2025
Author: Renaud Kauffmann
Date: 2025-01-16T11:53:18-08:00
New Revision: acba822a45a71ad5b2dc02927e6ac904675f9bd6
URL: https://github.com/llvm/llvm-project/commit/acba822a45a71ad5b2dc02927e6ac904675f9bd6
DIFF: https://github.com/llvm/llvm-project/commit/acba822a45a71ad5b2dc02927e6ac904675f9bd6.diff
LOG: [CUF] Moving __fadd_rd and __fadd_ru to cudadevice.f90 as they are symbol already known upstream. (#123127)
They are defined under `__clang_cuda_device_functions.h`
---------
Co-authored-by: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
Added:
Modified:
flang/module/__cuda_device.f90
flang/module/cudadevice.f90
Removed:
################################################################################
diff --git a/flang/module/__cuda_device.f90 b/flang/module/__cuda_device.f90
index 81b1f5aa334bbf..73f3d19c98a317 100644
--- a/flang/module/__cuda_device.f90
+++ b/flang/module/__cuda_device.f90
@@ -14,19 +14,4 @@
! Set PRIVATE by default to explicitly only export what is meant
! to be exported by this MODULE.
- interface
- attributes(device) function __fadd_rd(x, y) bind(c, name='__nv_fadd_rd')
- real, intent(in), value :: x, y
- real :: __fadd_rd
- end function
- end interface
- public :: __fadd_rd
-
- interface
- attributes(device) function __fadd_ru(x, y) bind(c, name='__nv_fadd_ru')
- real, intent(in), value :: x, y
- real :: __fadd_ru
- end function
- end interface
- public :: __fadd_ru
end module
diff --git a/flang/module/cudadevice.f90 b/flang/module/cudadevice.f90
index 5712a7724ae49d..3d487fd000a094 100644
--- a/flang/module/cudadevice.f90
+++ b/flang/module/cudadevice.f90
@@ -75,4 +75,22 @@ attributes(device) subroutine threadfence_system()
end interface
public :: threadfence_system
+ ! Math API
+
+ interface
+ attributes(device) function __fadd_rd(x, y) bind(c, name='__nv_fadd_rd')
+ real, intent(in), value :: x, y
+ real :: __fadd_rd
+ end function
+ end interface
+ public :: __fadd_rd
+
+ interface
+ attributes(device) function __fadd_ru(x, y) bind(c, name='__nv_fadd_ru')
+ real, intent(in), value :: x, y
+ real :: __fadd_ru
+ end function
+ end interface
+ public :: __fadd_ru
+
end module
More information about the flang-commits
mailing list