Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
cuda_error.hpp File Reference

Structured CUDA runtime failures and checked-call helpers. More...

#include <cuda_runtime_api.h>
#include <uni20/common/diagnostic_error.hpp>
#include <optional>
#include <source_location>
#include <string>
#include <string_view>
Include dependency graph for cuda_error.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  uni20::cuda::CudaRuntimeError
 Exception carrying a failed CUDA runtime operation and status. More...
 

Namespaces

namespace  uni20
 
namespace  uni20::cuda
 

Functions

void uni20::cuda::check (cudaError_t status, std::string_view operation, std::optional< int > device=std::nullopt, std::source_location where=std::source_location::current())
 Raise when a CUDA runtime operation did not return cudaSuccess.
 
void uni20::cuda::raise_runtime_error (cudaError_t status, std::string_view operation, std::optional< int > device=std::nullopt, std::source_location where=std::source_location::current())
 Raise a structured CUDA runtime failure through Uni20's error boundary.
 

Detailed Description

Structured CUDA runtime failures and checked-call helpers.