Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
CudaDebug.ixx File Reference
module Cuda.Debug
#include <cublasLt.h>
#include <cuda_runtime.h>
#include <cstdint>
#include <stdexcept>
#include <utility>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>
#include <iomanip>
import Logging.Logger;
import CublasLt.Error;
import Dnn.TensorTypes;

Namespaces

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

Functions

template<typename T>
void Mila::Dnn::Compute::Cuda::dump_2d_rowmajor_host (std::ostringstream &oss, const T *host_data, int rows, int cols, int max_display, int indent=0)
 Helper to dump a single 2D row-major matrix (host memory).
template<typename T = float>
std::string Mila::Dnn::Compute::Cuda::dump_tensor (const T *device_data, const shape_t &shape, const std::string &name="tensor", int max_display_size=16, cudaStream_t stream=nullptr)
 Debug utility to dump row-major tensor from device memory.
template<typename T>
void Mila::Dnn::Compute::Cuda::print_stats (const std::string &name, const T *data, const shape_t &shape, int max_display=8, cudaStream_t stream=nullptr)
 Copies a device tensor to host, formats it via dump_tensor, and emits the result through Logging::Logger::info.