Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
CudaTensorOps.Math.ixx File Reference

CUDA tensor mathematical operations partition. More...

#include <cuda_runtime.h>
#include <memory>
#include <stdexcept>
#include <source_location>
#include <cmath>
#include <vector>
#include "Kernels/Math.Elementwise.h"
import Dnn.Tensor;
import Dnn.TensorDataTypeMap;
import Compute.CudaDevice;
import Cuda.Error;
import Cuda.Helpers;
import Dnn.ITensor;
import Compute.CudaPinnedMemoryResource;
import Dnn.TensorDataType;
import Compute.CudaDeviceMemoryResource;
import Dnn.TensorDataTypeTraits;
import Compute.CudaTensorDataType;
import Compute.CudaManagedMemoryResource;
import Compute.ExecutionContext;
import Compute.DeviceType;

Classes

struct  Mila::Dnn::Compute::Cuda::MathOps
 CUDA specialization of TensorOps for mathematical operations. More...

Namespaces

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

Detailed Description

CUDA tensor mathematical operations partition.

Implements CUDA-specific tensor mathematical operations using device kernels for efficient parallel computation. Supports element-wise operations, reductions, and activation functions with automatic type handling.

Implementation strategy:

  • Element-wise operations use grid-stride loop kernels
  • Reduction operations use shared memory and warp-level primitives
  • Stream-based asynchronous execution for pipeline optimization
  • Zero-overhead borrowing of ExecutionContext
  • Automatic fallback to default stream when no context provided