Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
CudaError.ixx File Reference
module Cuda.Error

CUDA error handling utilities and exception class. More...

#include <cuda_runtime.h>
#include <stdexcept>
#include <string>
#include <ostream>
#include <sstream>
#include <source_location>
#include <cstdint>

Classes

class  Mila::Dnn::Compute::CudaError
 Exception class for CUDA runtime errors. More...

Namespaces

namespace  Mila
 Mila main API namespace.
namespace  Mila::Dnn
namespace  Mila::Dnn::Compute

Functions

void Mila::Dnn::Compute::cudaCheckLastError (const std::source_location &location=std::source_location::current())
 Checks the last CUDA error and throws if an error occurred.
void Mila::Dnn::Compute::cudaCheckStatus (cudaError_t status, const std::source_location &location=std::source_location::current())
 Checks the status of a CUDA operation and throws if an error occurred.

Detailed Description

CUDA error handling utilities and exception class.

This module provides a comprehensive error handling system for CUDA operations, including a custom exception class and utility functions for checking CUDA operation status. It simplifies error detection, provides detailed error information, and maintains source location context for debugging.