Skip to main content

Module cpp_extension

Module cpp_extension 

Source
Expand description

C++ Extension utilities for ToRSh

This module provides utilities for building C++ extensions that integrate with the ToRSh framework, similar to PyTorch’s cpp_extension module.

Structs§

BuildResult
Build result containing the path to the compiled extension
CppExtensionConfig
Configuration for building a C++ extension
CrossPlatformConfig
Cross-platform build configuration
CudaDeviceInfo
CUDA device information
CudaJitInfo
CUDA JIT compilation information
CudaKernelCompilationOptions
Advanced CUDA kernel compilation options
CudaLaunchConfig
CUDA kernel launch configuration
CustomOpDefinition
Custom operation definition
JitBuildInfo
JIT compilation build information
JitCompilationConfig
JIT compilation configuration
LinuxConfig
Linux-specific build configuration
MacOsConfig
macOS-specific build configuration
OpSchema
Operation schema for validation and optimization
RuntimeCudaKernel
Runtime CUDA kernel management
TensorType
Tensor type information
WindowsConfig
Windows-specific build configuration

Enums§

CompilerPreference
Compiler preference on Linux
CustomOpType
Custom operation type
MemoryRequirement
Memory requirement estimation
TargetPlatform
Target platform specification

Functions§

auto_tune_cuda_kernel
Auto-tune CUDA kernel launch parameters
build_cpp_extension
Build a C++ extension
compile_cuda_kernel_runtime
Compile CUDA kernel at runtime
cuda_is_available
Check if CUDA is available for building extensions
generate_extension_template
Generate a simple C++ extension template
get_cuda_arch_list
Get CUDA architectures available on the system
launch_cuda_kernel
Launch a runtime-compiled CUDA kernel
load_cpp_extension
Load a C++ extension from a shared library