| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Flang-RT] Fix GCC 15.1 Fortran Runtime libstdc++ Undefined Symbols (#157385) Define the _GLIBCXX_THROW_OR_ABORT macro to not use its _EXC argument. _EXC may contain an expression constructing an std::exception object which is non-inline and therefore require a link dependency on the libstdc++ runtime. In -fno-exceptions builds it is typically optimized away when appearing in unreachable code, but is still present when compiling with -O0 when compiling with Clang. --------- Co-authored-by: Michael Kruse <github@meinersbur.de> | 10 个月前 | |
[flang-rt] Set CUDA_SEPARABLE_COMPILATION for PTX library. (#129563) CUDA_SEPARABLE_COMPILATION adds -rdc=true, which is needed for the PTX library build. | 1 年前 | |
[flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX and LoP (#131041) This PR is to improve the driver code to build flang-rt path by re-using the logic and code of compiler-rt. 1. Moved addFortranRuntimeLibraryPath and addFortranRuntimeLibs to ToolChain.h and made them virtual so that they can be overridden if customization is needed. The current implementation of those two procedures is moved to ToolChain.cpp as the base implementation to default to. 2. Both AIX and PPCLinux now override addFortranRuntimeLibs. The overriding function of addFortranRuntimeLibs for both AIX and PPCLinux calls getCompilerRTArgString => getCompilerRT => buildCompilerRTBasename to get the path to flang-rt. This code handles LLVM_ENABLE_PER_TARGET_RUNTIME_DIR setting. As shown in PPCLinux.cpp, FT_static is the default. If not found, it will search and build for FT_shared. To differentiate flang-rt from clang-rt, a boolean flag IsFortran is passed to the chain of functions in order to reach buildCompilerRTBasename. | 1 年前 | |
[flang-rt] Add experimental support for GPU build (#131826) Summary: This patch adds initial support for compiling flang-rt directly for the GPU. The method used here matches what's already done for libc and libc++ for the GPU and builds off of those projects. Mainly this requires setting up some flags and setting the sources that currently work. This will deposit the resulting library in the appropriate directory. These files are then intended to be linked via -Xoffload-linker support in the offloading driver. lib/clang/21/lib/nvptx64-nvidia-cuda/libflang_rt.runtime.a lib/clang/21/lib/amdgcn-amd-amdhsa/libflang_rt.runtime.a This is obviously missing a lot of functions, mainly the io support. Most of what we cannot support is due to using POSIX things that just don't make sense on the GPU. Stuff like pthreads or sema. Getting unit tests to run on this will also be a challenge. We could run tests the same way we do with libc, but the problem there is that the libc test suite is freestanding while gtest currently doesn't compile on the GPU bcause it uses a lot of weird stuff. If the unit tests were simply int main then it would work. I don't understand the actual runtime code very well, I'd appreciate some guidance on how to actually support Fortran IO from this interface. As I understand it, Fortran IO requires a stack-like operation, which conflicts with the SIMT model GPUs use. Worst case scenario we could burn some LDS to keep a stack, or serialize it somehow since we can always just iterate over all the active lanes. Building this right now looks like this, which depends on the arguments added in https://github.com/llvm/llvm-project/pull/131695. -DRUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES=compiler-rt;libc;libcxx;libcxxabi;flang-rt \ -DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=compiler-rt;libc;libcxx;libcxxabi;flang-rt \ -DRUNTIMES_nvptx64-nvidia-cuda_FLANG_RT_LIBC_PROVIDER=llvm \ -DRUNTIMES_nvptx64-nvidia-cuda_FLANG_RT_LIBCXX_PROVIDER=llvm \ -DRUNTIMES_amdgcn-amd-amdhsa_FLANG_RT_LIBC_PROVIDER=llvm \ -DRUNTIMES_amdgcn-amd-amdhsa_FLANG_RT_LIBCXX_PROVIDER=llvm | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 |