Skip to content
Open
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
6 changes: 6 additions & 0 deletions quest/src/api/qureg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ Qureg validateAndCreateCustomQureg(int numQubits, int isDensMatr, int useDistrib
freeAllMemoryIfAnyAllocsFailed(qureg);
validate_newQuregAllocs(qureg, __func__);

// TODO / DEBUG:
// TEMPORARILY FORBID HIP GPU ACCELERATION OF > 2^32 AMPS PER NODE,
// SINCE THIS WILL LEAD TO LATER KERNEL LAUNCH FAILURES; see issue #815
if (useGpuAccel && gpu_isHipCompiled() && qureg.numAmpsPerNode >= (1LL << 32))
error_quregTooLargeForHipGpuAccel();

// initialise state to |0> or |0><0|
initZeroState(qureg);

Expand Down
11 changes: 11 additions & 0 deletions quest/src/core/errors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ void raiseInternalError(string errorMsg) {



/*
* TEMPORARY / DEBUG ERRORS
*/

void error_quregTooLargeForHipGpuAccel() {

raiseInternalError("The created Qureg contains more than 2^32 amplitudes per GPU, which would later trigger a current bug/limitation in QuEST's execution on AMD GPUs. See Github issue #815.");
}



/*
* VALIDATION ERRORS
*/
Expand Down
8 changes: 8 additions & 0 deletions quest/src/core/errors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ using std::string;



/*
* TEMPORARY / DEBUG ERRORS
*/

void error_quregTooLargeForHipGpuAccel();



/*
* VALIDATION ERRORS
*/
Expand Down
Loading