HW3: RC4 - Ampere/Gpu measurements version
This commit is contained in:
parent
f056b8c1cd
commit
5c136c20b9
@ -16,8 +16,11 @@
|
||||
/*
|
||||
* Versioning:
|
||||
* - RC1: First version to test on HPC
|
||||
* - RC2: A prephase added for v1 and v2
|
||||
* - RC3: V2 code refactor version measurements ** Not in the master branch
|
||||
* - RC4: Measurements version
|
||||
*/
|
||||
static constexpr char version[] = "0.1";
|
||||
static constexpr char version[] = "0.4";
|
||||
|
||||
/*
|
||||
* Defines for different version of the exercise
|
||||
|
@ -175,9 +175,7 @@ bool validator(DataT& data) {
|
||||
void init(int* argc, char*** argv) {
|
||||
|
||||
// Get device configuration
|
||||
if (cudaGetDeviceProperties(&device, 0) != cudaSuccess)
|
||||
throw std::runtime_error("[CUDA] - Can not read GPU");
|
||||
|
||||
if (cudaGetDeviceProperties(&device, 0) == cudaSuccess){
|
||||
config.blockSize = static_cast<size_t>(device.maxThreadsPerBlock);
|
||||
|
||||
// try to read command line
|
||||
@ -188,6 +186,12 @@ void init(int* argc, char*** argv) {
|
||||
Data.resize(config.arraySize);
|
||||
measurements_init();
|
||||
}
|
||||
else {
|
||||
// try to read command line for -h or --version
|
||||
get_options(*argc, *argv);
|
||||
throw std::runtime_error("[CUDA] - Can not read GPU");
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined TESTING
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user