llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-driver Author: Matt Arsenault (arsenm) <details> <summary>Changes</summary> These have not done anything in almost a year. --- Full diff: https://github.com/llvm/llvm-project/pull/182858.diff 16 Files Affected: - (modified) clang/include/clang/Driver/RocmInstallationDetector.h (+1-7) - (modified) clang/lib/Driver/ToolChains/AMDGPU.cpp (-11) - (removed) clang/test/Driver/Inputs/hip_dev_lib/oclc_correctly_rounded_sqrt_on.amdgcn.bc () - (removed) clang/test/Driver/Inputs/rocm-invalid/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc () - (removed) clang/test/Driver/Inputs/rocm-invalid/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc () - (removed) clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_off.bc () - (removed) clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_on.bc () - (removed) clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc () - (removed) clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc () - (removed) clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc () - (removed) clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc () - (removed) clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc () - (removed) clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc () - (modified) clang/test/Driver/amdgpu-openmp-toolchain.c (+2-2) - (modified) clang/test/Driver/hip-device-libs.hip (-5) - (modified) clang/test/Driver/rocm-device-libs.cl (-5) ``````````diff diff --git a/clang/include/clang/Driver/RocmInstallationDetector.h b/clang/include/clang/Driver/RocmInstallationDetector.h index 488d9e7d40587..b20dddbd045ea 100644 --- a/clang/include/clang/Driver/RocmInstallationDetector.h +++ b/clang/include/clang/Driver/RocmInstallationDetector.h @@ -82,7 +82,6 @@ class RocmInstallationDetector { bool FiniteOnly; bool UnsafeMathOpt; bool FastRelaxedMath; - bool CorrectSqrt; bool GPUSan; }; @@ -146,7 +145,6 @@ class RocmInstallationDetector { ConditionalLibrary WavefrontSize64; ConditionalLibrary FiniteOnly; ConditionalLibrary UnsafeMath; - ConditionalLibrary CorrectlyRoundedSqrt; // Maps ABI version to library path. The version number is in the format of // three digits as used in the ABI version library name. @@ -160,7 +158,7 @@ class RocmInstallationDetector { bool allGenericLibsValid() const { return !OCML.empty() && !OCKL.empty() && !OpenCL.empty() && WavefrontSize64.isValid() && FiniteOnly.isValid() && - UnsafeMath.isValid() && CorrectlyRoundedSqrt.isValid(); + UnsafeMath.isValid(); } void scanLibDevicePath(llvm::StringRef Path); @@ -251,10 +249,6 @@ class RocmInstallationDetector { return UnsafeMath.get(Enabled); } - StringRef getCorrectlyRoundedSqrtPath(bool Enabled) const { - return CorrectlyRoundedSqrt.get(Enabled); - } - StringRef getABIVersionPath(DeviceLibABIVersion ABIVer) const { auto Loc = ABIVersionMap.find(ABIVer.ABIVersion); if (Loc == ABIVersionMap.end()) diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp index ef5189359cd1a..fc78ff02ef214 100644 --- a/clang/lib/Driver/ToolChains/AMDGPU.cpp +++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp @@ -81,12 +81,6 @@ RocmInstallationDetector::CommonBitcodeLibsPreferences:: DriverArgs.hasFlag(options::OPT_ffast_math, options::OPT_fno_fast_math, false); - const bool DefaultSqrt = IsKnownOffloading ? true : false; - CorrectSqrt = - DriverArgs.hasArg(options::OPT_cl_fp32_correctly_rounded_divide_sqrt) || - DriverArgs.hasFlag( - options::OPT_fhip_fp32_correctly_rounded_divide_sqrt, - options::OPT_fno_hip_fp32_correctly_rounded_divide_sqrt, DefaultSqrt); // GPU Sanitizer currently only supports ASan and is enabled through host // ASan. GPUSan = (DriverArgs.hasFlag(options::OPT_fgpu_sanitize, @@ -127,10 +121,6 @@ void RocmInstallationDetector::scanLibDevicePath(llvm::StringRef Path) { FiniteOnly.Off = FilePath; } else if (BaseName == "oclc_finite_only_on") { FiniteOnly.On = FilePath; - } else if (BaseName == "oclc_correctly_rounded_sqrt_on") { - CorrectlyRoundedSqrt.On = FilePath; - } else if (BaseName == "oclc_correctly_rounded_sqrt_off") { - CorrectlyRoundedSqrt.Off = FilePath; } else if (BaseName == "oclc_unsafe_math_on") { UnsafeMath.On = FilePath; } else if (BaseName == "oclc_unsafe_math_off") { @@ -1054,7 +1044,6 @@ RocmInstallationDetector::getCommonBitcodeLibs( AddBCLib(getOCKLPath(), false); AddBCLib(getUnsafeMathPath(Pref.UnsafeMathOpt || Pref.FastRelaxedMath)); AddBCLib(getFiniteOnlyPath(Pref.FiniteOnly || Pref.FastRelaxedMath)); - AddBCLib(getCorrectlyRoundedSqrtPath(Pref.CorrectSqrt)); AddBCLib(getWavefrontSize64Path(Pref.Wave64)); AddBCLib(LibDeviceFile); auto ABIVerPath = getABIVersionPath(Pref.ABIVer); diff --git a/clang/test/Driver/Inputs/hip_dev_lib/oclc_correctly_rounded_sqrt_on.amdgcn.bc b/clang/test/Driver/Inputs/hip_dev_lib/oclc_correctly_rounded_sqrt_on.amdgcn.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm-invalid/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc b/clang/test/Driver/Inputs/rocm-invalid/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm-invalid/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc b/clang/test/Driver/Inputs/rocm-invalid/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_off.bc b/clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_off.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_on.bc b/clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_on.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc b/clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc b/clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/clang/test/Driver/amdgpu-openmp-toolchain.c b/clang/test/Driver/amdgpu-openmp-toolchain.c index 688faaec6e015..9203d9271711b 100644 --- a/clang/test/Driver/amdgpu-openmp-toolchain.c +++ b/clang/test/Driver/amdgpu-openmp-toolchain.c @@ -54,12 +54,12 @@ // RUN: %clang -### -target x86_64-pc-linux-gnu -fopenmp --offload-arch=gfx803 \ // RUN: --no-offloadlib --offloadlib --rocm-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-LIB-DEVICE -// CHECK-LIB-DEVICE: "-cc1" {{.*}}ocml.bc"{{.*}}oclc_unsafe_math_off.bc"{{.*}}oclc_finite_only_off.bc"{{.*}}oclc_correctly_rounded_sqrt_on.bc"{{.*}}oclc_wavefrontsize64_on.bc"{{.*}}oclc_isa_version_803.bc" +// CHECK-LIB-DEVICE: "-cc1" {{.*}}ocml.bc"{{.*}}oclc_unsafe_math_off.bc"{{.*}}oclc_finite_only_off.bc"{{.*}}oclc_wavefrontsize64_on.bc"{{.*}}oclc_isa_version_803.bc" // RUN: %clang -### -target x86_64-pc-linux-gnu -fopenmp --offload-arch=gfx803 -nogpulib \ // RUN: --offloadlib --no-offloadlib --rocm-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-LIB-DEVICE-NOGPULIB -// CHECK-LIB-DEVICE-NOGPULIB-NOT: "-cc1" {{.*}}ocml.bc"{{.*}}oclc_unsafe_math_off.bc"{{.*}}oclc_finite_only_off.bc"{{.*}}oclc_correctly_rounded_sqrt_on.bc"{{.*}}oclc_wavefrontsize64_on.bc"{{.*}}oclc_isa_version_803.bc" +// CHECK-LIB-DEVICE-NOGPULIB-NOT: "-cc1" {{.*}}ocml.bc"{{.*}}oclc_unsafe_math_off.bc"{{.*}}oclc_finite_only_off.bc"{{.*}}oclc_wavefrontsize64_on.bc"{{.*}}oclc_isa_version_803.bc" // RUN: %clang -### -target x86_64-pc-linux-gnu -fopenmp --offload-arch=gfx90a:sramecc-:xnack+ \ // RUN: -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-TARGET-ID diff --git a/clang/test/Driver/hip-device-libs.hip b/clang/test/Driver/hip-device-libs.hip index b3829114138cb..77d0bca4565dd 100644 --- a/clang/test/Driver/hip-device-libs.hip +++ b/clang/test/Driver/hip-device-libs.hip @@ -215,26 +215,21 @@ // ALL-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]oclc_unsafe_math_off.bc" // ALL-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]oclc_finite_only_off.bc" -// ALL-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]oclc_correctly_rounded_sqrt_on.bc" // ALL-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]oclc_wavefrontsize64_on.bc" // ALL-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]oclc_isa_version_{{[0-9]+}}.bc" // INST-SAME: "-mlink-builtin-bitcode" "{{.*}}instrument.bc" // FAST: "-mlink-builtin-bitcode" "{{.*}}oclc_unsafe_math_on.bc" // FAST-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_finite_only_on.bc" -// FAST-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_correctly_rounded_sqrt_on.bc" // FINITE: "-mlink-builtin-bitcode" "{{.*}}oclc_unsafe_math_off.bc" // FINITE-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_finite_only_on.bc" -// FINITE-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_correctly_rounded_sqrt_on.bc" // UNSAFE: "-mlink-builtin-bitcode" "{{.*}}oclc_unsafe_math_on.bc" // UNSAFE-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_finite_only_off.bc" -// UNSAFE-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_correctly_rounded_sqrt_on.bc" // DIVSQRT: "-mlink-builtin-bitcode" "{{.*}}oclc_unsafe_math_off.bc" // DIVSQRT-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_finite_only_off.bc" -// DIVSQRT-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_correctly_rounded_sqrt_off.bc" // ABI4-NOT: error: // ABI4: "-mlink-builtin-bitcode" "{{.*}}oclc_abi_version_400.bc" diff --git a/clang/test/Driver/rocm-device-libs.cl b/clang/test/Driver/rocm-device-libs.cl index e77a6a07315ad..4741862be266e 100644 --- a/clang/test/Driver/rocm-device-libs.cl +++ b/clang/test/Driver/rocm-device-libs.cl @@ -165,27 +165,22 @@ // COMMON-DEFAULT-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_unsafe_math_off.bc" // COMMON-DEFAULT-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_finite_only_off.bc" -// COMMON-DEFAULT-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc" // COMMON-FINITE-ONLY-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_unsafe_math_off.bc" // COMMON-FINITE-ONLY-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_finite_only_on.bc" -// COMMON-FINITE-ONLY-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc" // COMMON-CORRECT-SQRT-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_unsafe_math_off.bc" // COMMON-CORRECT-SQRT-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_finite_only_off.bc" -// COMMON-CORRECT-SQRT-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc" // COMMON-FAST-RELAXED-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_unsafe_math_on.bc" // COMMON-FAST-RELAXED-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_finite_only_on.bc" -// COMMON-FAST-RELAXED-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc" // COMMON-UNSAFE-MATH-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_unsafe_math_on.bc" // COMMON-UNSAFE-MATH-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_finite_only_off.bc" -// COMMON-UNSAFE-MATH-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc" // ASAN-SAME: "-fsanitize=address" `````````` </details> https://github.com/llvm/llvm-project/pull/182858 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
