[PATCH] D99688: [CUDA][HIP] rename -fcuda-flush-denormals-to-zero
This revision was automatically updated to reflect the committed changes. Closed by commit rG907af8439672: [CUDA][HIP] rename -fcuda-flush-denormals-to-zero (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99688/new/ https://reviews.llvm.org/D99688 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/AMDGPU.cpp clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Driver/ToolChains/HIP.cpp clang/test/CodeGenCUDA/flush-denormals.cu clang/test/Driver/cuda-flush-denormals-to-zero.cu clang/test/Driver/hip-device-libs.hip Index: clang/test/Driver/hip-device-libs.hip === --- clang/test/Driver/hip-device-libs.hip +++ clang/test/Driver/hip-device-libs.hip @@ -24,7 +24,7 @@ // Test explicit flag, opposite of target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fcuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -33,7 +33,7 @@ // Test explicit flag, opposite of target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fno-cuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -42,7 +42,7 @@ // Test explicit flag, same as target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fno-cuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -51,7 +51,7 @@ // Test explicit flag, same as target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fcuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -60,7 +60,7 @@ // Test last flag wins, not flushing // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fcuda-flush-denormals-to-zero -fno-cuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -68,7 +68,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fcuda-flush-denormals-to-zero -fno-cuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -76,7 +76,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fno-cuda-flush-denormals-to-zero -fcuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -84,7 +84,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fno-cuda-flush-denormals-to-zero -fcuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD Index: clang/test/Driver/cuda-flush-denormals-to-zero.cu === --- clang/test/Driver/cuda-flush-denormals-to-zero.cu +++ clang/test/Driver/cuda-flush-denormals-to-zero.cu @@ -1,22 +1,26 @@ // Checks that cuda compilation does the right thing when passed -// -fcuda-flush-denormals-to-zero. This should be translated to +// -fgpu-flush-denormals-to-zero. This should be translated to // -fdenormal-fp-math-f32=preserve-sign +// RUN: %clang -no-canonical-prefixes -### -target x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fgpu-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=FTZ %s +// RUN: %clang -no-canonical-prefixes -### -target x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fno-gpu-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s +// RUN: %clang
[PATCH] D99688: [CUDA][HIP] rename -fcuda-flush-denormals-to-zero
yaxunl updated this revision to Diff 335192. yaxunl marked an inline comment as done. yaxunl added a comment. rebase and add tests for old options CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99688/new/ https://reviews.llvm.org/D99688 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/AMDGPU.cpp clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Driver/ToolChains/HIP.cpp clang/test/CodeGenCUDA/flush-denormals.cu clang/test/Driver/cuda-flush-denormals-to-zero.cu clang/test/Driver/hip-device-libs.hip Index: clang/test/Driver/hip-device-libs.hip === --- clang/test/Driver/hip-device-libs.hip +++ clang/test/Driver/hip-device-libs.hip @@ -24,7 +24,7 @@ // Test explicit flag, opposite of target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fcuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -33,7 +33,7 @@ // Test explicit flag, opposite of target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fno-cuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -42,7 +42,7 @@ // Test explicit flag, same as target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fno-cuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -51,7 +51,7 @@ // Test explicit flag, same as target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fcuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -60,7 +60,7 @@ // Test last flag wins, not flushing // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fcuda-flush-denormals-to-zero -fno-cuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -68,7 +68,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fcuda-flush-denormals-to-zero -fno-cuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -76,7 +76,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fno-cuda-flush-denormals-to-zero -fcuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -84,7 +84,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fno-cuda-flush-denormals-to-zero -fcuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD Index: clang/test/Driver/cuda-flush-denormals-to-zero.cu === --- clang/test/Driver/cuda-flush-denormals-to-zero.cu +++ clang/test/Driver/cuda-flush-denormals-to-zero.cu @@ -1,22 +1,26 @@ // Checks that cuda compilation does the right thing when passed -// -fcuda-flush-denormals-to-zero. This should be translated to +// -fgpu-flush-denormals-to-zero. This should be translated to // -fdenormal-fp-math-f32=preserve-sign +// RUN: %clang -no-canonical-prefixes -### -target x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fgpu-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=FTZ %s +// RUN: %clang -no-canonical-prefixes -### -target x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fno-gpu-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s +// RUN: %clang -no-canonical-prefixes -### -target x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_70
[PATCH] D99688: [CUDA][HIP] rename -fcuda-flush-denormals-to-zero
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/Driver/cuda-flush-denormals-to-zero.cu:2 // Checks that cuda compilation does the right thing when passed -// -fcuda-flush-denormals-to-zero. This should be translated to +// -fgpu-flush-denormals-to-zero. This should be translated to // -fdenormal-fp-math-f32=preserve-sign tra wrote: > It would be good to add a couple of tests to verify that > `-fcuda-flush-denormals-to-zero` still work as we still need them for > existing users. will do CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99688/new/ https://reviews.llvm.org/D99688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D99688: [CUDA][HIP] rename -fcuda-flush-denormals-to-zero
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/cuda-flush-denormals-to-zero.cu:2 // Checks that cuda compilation does the right thing when passed -// -fcuda-flush-denormals-to-zero. This should be translated to +// -fgpu-flush-denormals-to-zero. This should be translated to // -fdenormal-fp-math-f32=preserve-sign It would be good to add a couple of tests to verify that `-fcuda-flush-denormals-to-zero` still work as we still need them for existing users. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99688/new/ https://reviews.llvm.org/D99688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D99688: [CUDA][HIP] rename -fcuda-flush-denormals-to-zero
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: jansvoboda11, dang, kerbowa, nhaehnle, jvesely. yaxunl requested review of this revision. Rename it to -fgpu-flush-denormals-to-zero https://reviews.llvm.org/D99688 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/AMDGPU.cpp clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Driver/ToolChains/HIP.cpp clang/test/CodeGenCUDA/flush-denormals.cu clang/test/Driver/cuda-flush-denormals-to-zero.cu clang/test/Driver/hip-device-libs.hip Index: clang/test/Driver/hip-device-libs.hip === --- clang/test/Driver/hip-device-libs.hip +++ clang/test/Driver/hip-device-libs.hip @@ -24,7 +24,7 @@ // Test explicit flag, opposite of target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fcuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -33,7 +33,7 @@ // Test explicit flag, opposite of target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fno-cuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -42,7 +42,7 @@ // Test explicit flag, same as target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fno-cuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -51,7 +51,7 @@ // Test explicit flag, same as target default. // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fcuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -60,7 +60,7 @@ // Test last flag wins, not flushing // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fcuda-flush-denormals-to-zero -fno-cuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -68,7 +68,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fcuda-flush-denormals-to-zero -fno-cuda-flush-denormals-to-zero \ +// RUN: -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD @@ -76,7 +76,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ -// RUN: -fno-cuda-flush-denormals-to-zero -fcuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD @@ -84,7 +84,7 @@ // RUN: %clang -### -target x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ -// RUN: -fno-cuda-flush-denormals-to-zero -fcuda-flush-denormals-to-zero \ +// RUN: -fno-gpu-flush-denormals-to-zero -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD Index: clang/test/Driver/cuda-flush-denormals-to-zero.cu === --- clang/test/Driver/cuda-flush-denormals-to-zero.cu +++ clang/test/Driver/cuda-flush-denormals-to-zero.cu @@ -1,22 +1,22 @@ // Checks that cuda compilation does the right thing when passed -// -fcuda-flush-denormals-to-zero. This should be translated to +// -fgpu-flush-denormals-to-zero. This should be translated to // -fdenormal-fp-math-f32=preserve-sign -// RUN: %clang -no-canonical-prefixes -### -target x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fcuda-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=FTZ %s -// RUN: %clang -no-canonical-prefixes -### -target x86_64-linux-gnu -c -march=haswell --cuda-gpu-arch=sm_20 -fno-cuda-flush-denormals-to-zero -nocudainc -nocudalib %s 2>&1 | FileCheck -check-prefix=NOFTZ %s -// RUN: %clang -no-canonical-prefixes -### -target x86_64-linux-gnu -c