31 #ifndef NV_CUDNN_DISABLE_EXCEPTION 37 return std::runtime_error::what();
43 throw_if(std::function<
bool()> expr,
const char *message) {
45 #ifndef NV_CUDNN_DISABLE_EXCEPTION 53 #ifndef NV_CUDNN_DISABLE_EXCEPTION 61 if (desc !=
nullptr) {
65 #ifndef NV_CUDNN_DISABLE_EXCEPTION 67 std::string(std::string(message) + std::string(
" cudnn_status: ") +
std::to_string(status)).c_str());
cudnnException(const char *message)
void set_status(cudnnStatus_t const status_) const
Set status of the descriptor.
static void set_error_and_throw_exception(BackendDescriptor const *desc, cudnnStatus_t status, const char *message)
NLOHMANN_BASIC_JSON_TPL_DECLARATION std::string to_string(const NLOHMANN_BASIC_JSON_TPL &j)
user-defined to_string function for JSON values
virtual const char * what() const
static void throw_if(std::function< bool()> expr, const char *message)
void set_error(const char *message) const
Set Diagonistic error message.