Open WilliamKyle opened 2 months ago
#include <cuda_runtime_api.h> #include <iostream> using namespace std; int main(int argc, char *argv[]) { void *data; cudaStream_t stream_ = 0; for (size_t i = 0; i < 32; i++) { cudaError_t error = cudaMallocAsync(&data, 1024 * 1024 * 1024, stream_); cout << "Gpu use: " << (i + 1) << "G " << cudaGetErrorString(error) << endl; } getchar(); return 0; }
#include <cuda_runtime_api.h> #include <iostream> using namespace std; int main(int argc, char *argv[]) { void *data; cudaStream_t stream_ = 0; for (size_t i = 0; i < 32; i++) { cudaError_t error = cudaMalloc(&data, 1024 * 1024 * 1024); cout << "Gpu use: " << (i + 1) << "G " << cudaGetErrorString(error) << endl; } getchar(); return 0; }
cudaMallocAsync has one more failure when get 12G on 551.61 with Prefer System Fallback
cudaMallocAsync
551.61
Prefer System Fallback
Code
cudaMallocAsync
cudaMalloc
Driver Version 536.67
No Option CUDA - Sysmem Fallback Policy
cudaMallocAsync
cudaMalloc
Driver Version 551.61
Prefer System Fallback
cudaMallocAsync
cudaMalloc
Prefer No System Fallback
cudaMallocAsync
cudaMalloc
cudaMallocAsync
has one more failure when get 12G on551.61
withPrefer System Fallback