-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CUDA utilities and implement fallbacks
Move the CUDA command line utilities cudaComputeCapabilities and cudaIsEnabled from HeterogeneousCore/CUDAServices to CUDAUtilities. Implement fallback binaries for cudaComputeCapabilities and cudaIsEnabled for platforms that do not support CUDA.
- Loading branch information
Showing
8 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<iftool name="cuda-gcc-support"> | ||
<use name="cuda"/> | ||
<bin name="cudaComputeCapabilities" file="cudaComputeCapabilities.cpp isCudaDeviceSupported.cu"/> | ||
<bin name="cudaIsEnabled" file="cudaIsEnabled.cpp isCudaDeviceSupported.cu"/> | ||
<else/> | ||
<bin name="cudaComputeCapabilities" file="cudaComputeCapabilities_fallback.cpp"/> | ||
<bin name="cudaIsEnabled" file="cudaIsEnabled_fallback.cpp"/> | ||
</iftool> |
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
HeterogeneousCore/CUDAUtilities/bin/cudaComputeCapabilities_fallback.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// C/C++ headers | ||
#include <cstdlib> | ||
#include <iostream> | ||
|
||
// always returns EXIT_FAILURE | ||
int main() { | ||
std::cerr << "cudaComputeCapabilities: CUDA is not supported on this architecture" << std::endl; | ||
return EXIT_FAILURE; | ||
} |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
HeterogeneousCore/CUDAUtilities/bin/cudaIsEnabled_fallback.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// C/C++ headers | ||
#include <cstdlib> | ||
|
||
// always returns EXIT_FAILURE | ||
int main() { return EXIT_FAILURE; } |
File renamed without changes.
File renamed without changes.