[flang-commits] [flang] [CUF] Moving __fadd_rd and __fadd_ru to cudadevice.f90 as they are symbol already known upstream. (PR #123127)
Renaud Kauffmann via flang-commits
flang-commits at lists.llvm.org
Wed Jan 15 14:16:46 PST 2025
https://github.com/Renaud-K created https://github.com/llvm/llvm-project/pull/123127
They are defined under `__clang_cuda_device_functions.h`
>From acd95ec0be0fec73e78f257f3b9ee7dfdf270931 Mon Sep 17 00:00:00 2001
From: Renaud-K <rkauffmann at nvidia.com>
Date: Wed, 15 Jan 2025 14:14:08 -0800
Subject: [PATCH] Moving __fadd_rd and __fadd_ru to cudadevice.f90 as they are
upstream symbols.
---
flang/module/__cuda_device.f90 | 15 ---------------
flang/module/cudadevice.f90 | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 15 deletions(-)
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 b07f82be6a7243..549263abc19b80 100644
--- a/flang/module/cudadevice.f90
+++ b/flang/module/cudadevice.f90
@@ -72,4 +72,20 @@ attributes(device) subroutine threadfence_system()
end interface
public :: threadfence_system
+ 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