-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Remove incorrect CUDA defines #123898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove incorrect CUDA defines #123898
Conversation
@llvm/pr-subscribers-clang-driver Author: Sergey Kozub (sergey-kozub) ChangesRemove CUDA_127 and CUDA_129 defines incorrectly added in #123398 Full diff: https://github.com/llvm/llvm-project/pull/123898.diff 3 Files Affected:
diff --git a/clang/include/clang/Basic/Cuda.h b/clang/include/clang/Basic/Cuda.h
index 1cdfc8178db843..f33ba46233a7ab 100644
--- a/clang/include/clang/Basic/Cuda.h
+++ b/clang/include/clang/Basic/Cuda.h
@@ -44,12 +44,10 @@ enum class CudaVersion {
CUDA_124,
CUDA_125,
CUDA_126,
- CUDA_127,
CUDA_128,
- CUDA_129,
FULLY_SUPPORTED = CUDA_123,
PARTIALLY_SUPPORTED =
- CUDA_129, // Partially supported. Proceed with a warning.
+ CUDA_128, // Partially supported. Proceed with a warning.
NEW = 10000, // Too new. Issue a warning, but allow using it.
};
const char *CudaVersionToString(CudaVersion V);
diff --git a/clang/lib/Basic/Cuda.cpp b/clang/lib/Basic/Cuda.cpp
index b1461429d4f51a..1bfec0b37c5ee8 100644
--- a/clang/lib/Basic/Cuda.cpp
+++ b/clang/lib/Basic/Cuda.cpp
@@ -44,9 +44,7 @@ static const CudaVersionMapEntry CudaNameVersionMap[] = {
CUDA_ENTRY(12, 4),
CUDA_ENTRY(12, 5),
CUDA_ENTRY(12, 6),
- CUDA_ENTRY(12, 7),
CUDA_ENTRY(12, 8),
- CUDA_ENTRY(12, 9),
{"", CudaVersion::NEW, llvm::VersionTuple(std::numeric_limits<int>::max())},
{"unknown", CudaVersion::UNKNOWN, {}} // End of list tombstone.
};
@@ -232,7 +230,7 @@ CudaVersion MinVersionForOffloadArch(OffloadArch A) {
return CudaVersion::CUDA_120;
case OffloadArch::SM_100:
case OffloadArch::SM_100a:
- return CudaVersion::CUDA_127;
+ return CudaVersion::CUDA_128;
default:
llvm_unreachable("invalid enum");
}
diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
index 27e1969dabe551..7f286fec3ab019 100644
--- a/clang/lib/Driver/ToolChains/Cuda.cpp
+++ b/clang/lib/Driver/ToolChains/Cuda.cpp
@@ -89,12 +89,8 @@ CudaVersion getCudaVersion(uint32_t raw_version) {
return CudaVersion::CUDA_125;
if (raw_version < 12070)
return CudaVersion::CUDA_126;
- if (raw_version < 12080)
- return CudaVersion::CUDA_127;
if (raw_version < 12090)
return CudaVersion::CUDA_128;
- if (raw_version < 12100)
- return CudaVersion::CUDA_129;
return CudaVersion::NEW;
}
|
@llvm/pr-subscribers-clang Author: Sergey Kozub (sergey-kozub) ChangesRemove CUDA_127 and CUDA_129 defines incorrectly added in #123398 Full diff: https://github.com/llvm/llvm-project/pull/123898.diff 3 Files Affected:
diff --git a/clang/include/clang/Basic/Cuda.h b/clang/include/clang/Basic/Cuda.h
index 1cdfc8178db843..f33ba46233a7ab 100644
--- a/clang/include/clang/Basic/Cuda.h
+++ b/clang/include/clang/Basic/Cuda.h
@@ -44,12 +44,10 @@ enum class CudaVersion {
CUDA_124,
CUDA_125,
CUDA_126,
- CUDA_127,
CUDA_128,
- CUDA_129,
FULLY_SUPPORTED = CUDA_123,
PARTIALLY_SUPPORTED =
- CUDA_129, // Partially supported. Proceed with a warning.
+ CUDA_128, // Partially supported. Proceed with a warning.
NEW = 10000, // Too new. Issue a warning, but allow using it.
};
const char *CudaVersionToString(CudaVersion V);
diff --git a/clang/lib/Basic/Cuda.cpp b/clang/lib/Basic/Cuda.cpp
index b1461429d4f51a..1bfec0b37c5ee8 100644
--- a/clang/lib/Basic/Cuda.cpp
+++ b/clang/lib/Basic/Cuda.cpp
@@ -44,9 +44,7 @@ static const CudaVersionMapEntry CudaNameVersionMap[] = {
CUDA_ENTRY(12, 4),
CUDA_ENTRY(12, 5),
CUDA_ENTRY(12, 6),
- CUDA_ENTRY(12, 7),
CUDA_ENTRY(12, 8),
- CUDA_ENTRY(12, 9),
{"", CudaVersion::NEW, llvm::VersionTuple(std::numeric_limits<int>::max())},
{"unknown", CudaVersion::UNKNOWN, {}} // End of list tombstone.
};
@@ -232,7 +230,7 @@ CudaVersion MinVersionForOffloadArch(OffloadArch A) {
return CudaVersion::CUDA_120;
case OffloadArch::SM_100:
case OffloadArch::SM_100a:
- return CudaVersion::CUDA_127;
+ return CudaVersion::CUDA_128;
default:
llvm_unreachable("invalid enum");
}
diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
index 27e1969dabe551..7f286fec3ab019 100644
--- a/clang/lib/Driver/ToolChains/Cuda.cpp
+++ b/clang/lib/Driver/ToolChains/Cuda.cpp
@@ -89,12 +89,8 @@ CudaVersion getCudaVersion(uint32_t raw_version) {
return CudaVersion::CUDA_125;
if (raw_version < 12070)
return CudaVersion::CUDA_126;
- if (raw_version < 12080)
- return CudaVersion::CUDA_127;
if (raw_version < 12090)
return CudaVersion::CUDA_128;
- if (raw_version < 12100)
- return CudaVersion::CUDA_129;
return CudaVersion::NEW;
}
|
77485f7
to
1c4a581
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me. Let us wait for Artem's review
Remove CUDA_127 and CUDA_129 defines incorrectly added in #123398