Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions source/module_base/module_device/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#if defined(__CUDA)
#include <cuda_runtime.h>
#include <cuda.h>
#endif

#if defined(__ROCM)
Expand Down Expand Up @@ -299,6 +300,7 @@ void print_device_info<base_device::DEVICE_GPU>(
sprintf(msg, " CUDA Capability Major/Minor version number: %d.%d\n",
deviceProp.major, deviceProp.minor);
ofs_device << msg << std::endl;
#if defined(CUDA_VERSION) && CUDA_VERSION < 13000
sprintf(msg,
" GPU Max Clock rate: %.0f MHz (%0.2f "
"GHz)\n",
Expand All @@ -312,6 +314,7 @@ void print_device_info<base_device::DEVICE_GPU>(
sprintf(msg, " Memory Bus Width: %d-bit\n",
deviceProp.memoryBusWidth);
ofs_device << msg << std::endl;
#endif
sprintf(msg,
" Maximum Texture Dimension Size (x,y,z) 1D=(%d), 2D=(%d, "
"%d), 3D=(%d, %d, %d)\n",
Expand Down Expand Up @@ -366,6 +369,7 @@ void print_device_info<base_device::DEVICE_GPU>(
sprintf(msg, " Texture alignment: %zu bytes\n",
deviceProp.textureAlignment);
ofs_device << msg << std::endl;
#if defined(CUDA_VERSION) && CUDA_VERSION < 13000
sprintf(msg,
" Concurrent copy and kernel execution: %s with %d copy "
"engine(s)\n",
Expand All @@ -375,6 +379,7 @@ void print_device_info<base_device::DEVICE_GPU>(
sprintf(msg, " Run time limit on kernels: %s\n",
deviceProp.kernelExecTimeoutEnabled ? "Yes" : "No");
ofs_device << msg << std::endl;
#endif
sprintf(msg, " Integrated GPU sharing Host Memory: %s\n",
deviceProp.integrated ? "Yes" : "No");
ofs_device << msg << std::endl;
Expand All @@ -399,13 +404,15 @@ void print_device_info<base_device::DEVICE_GPU>(
sprintf(msg, " Supports Cooperative Kernel Launch: %s\n",
deviceProp.cooperativeLaunch ? "Yes" : "No");
ofs_device << msg << std::endl;
sprintf(msg, " Supports MultiDevice Co-op Kernel Launch: %s\n",
deviceProp.cooperativeMultiDeviceLaunch ? "Yes" : "No");
ofs_device << msg << std::endl;
sprintf(msg,
" Device PCI Domain ID / Bus ID / location ID: %d / %d / %d\n",
deviceProp.pciDomainID, deviceProp.pciBusID, deviceProp.pciDeviceID);
ofs_device << msg << std::endl;
#if defined(CUDA_VERSION) && CUDA_VERSION < 13000
sprintf(msg, " Supports MultiDevice Co-op Kernel Launch: %s\n",
deviceProp.cooperativeMultiDeviceLaunch ? "Yes" : "No");
ofs_device << msg << std::endl;

const char *sComputeMode[] = {
"Default (multiple host threads can use ::cudaSetDevice() with device "
"simultaneously)",
Expand All @@ -421,7 +428,7 @@ void print_device_info<base_device::DEVICE_GPU>(
ofs_device << msg << std::endl;
ofs_device << " " << sComputeMode[deviceProp.computeMode] << std::endl
<< std::endl;

#endif
// If there are 2 or more GPUs, query to determine whether RDMA is supported
if (deviceCount >= 2) {
cudaDeviceProp prop[64];
Expand Down Expand Up @@ -711,4 +718,4 @@ void record_device_memory<base_device::DEVICE_GPU>(
#endif

} // end of namespace information
} // end of namespace base_device
} // end of namespace base_device
23 changes: 13 additions & 10 deletions source/module_hsolver/kernels/cuda/helper_cuda.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,30 +137,33 @@ static const char *_cudaGetErrorEnum(cufftResult error) {

case CUFFT_UNALIGNED_DATA:
return "CUFFT_UNALIGNED_DATA";

case CUFFT_INCOMPLETE_PARAMETER_LIST:
return "CUFFT_INCOMPLETE_PARAMETER_LIST";


case CUFFT_INVALID_DEVICE:
return "CUFFT_INVALID_DEVICE";

case CUFFT_PARSE_ERROR:
return "CUFFT_PARSE_ERROR";

case CUFFT_NO_WORKSPACE:
return "CUFFT_NO_WORKSPACE";

case CUFFT_NOT_IMPLEMENTED:
return "CUFFT_NOT_IMPLEMENTED";

#if defined(CUDA_VERSION) && CUDA_VERSION < 13000
case CUFFT_INCOMPLETE_PARAMETER_LIST:
return "CUFFT_INCOMPLETE_PARAMETER_LIST";

case CUFFT_PARSE_ERROR:
return "CUFFT_PARSE_ERROR";

case CUFFT_LICENSE_ERROR:
return "CUFFT_LICENSE_ERROR";
#endif

case CUFFT_NOT_SUPPORTED:
return "CUFFT_NOT_SUPPORTED";

default:
return "<unknown>";
}

return "<unknown>";
}
#endif

Expand Down Expand Up @@ -965,4 +968,4 @@ inline bool checkCudaCapabilities(int major_version, int minor_version) {

// end of CUDA Helper Functions

#endif // COMMON_HELPER_CUDA_H_
#endif // COMMON_HELPER_CUDA_H_
Loading