|
Halide 21.0.0
Halide compiler and libraries
|
Set of utility functions to wrap PyTorch tensors into Halide buffers, making sure the data in on the correct device (CPU/GPU). More...
#include <exception>#include <iostream>#include <sstream>#include <string>#include <vector>#include "HalideBuffer.h"Go to the source code of this file.
Classes | |
| class | Halide::PyTorch::Buffer< T, Dims, InClassDimStorage > |
| A templated Buffer class that wraps halide_buffer_t and adds functionality. More... | |
Namespaces | |
| namespace | Halide |
| This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it. | |
| namespace | Halide::PyTorch |
Macros | |
| #define | HLPT_CHECK_CONTIGUOUS(x) |
| #define | HLPT_CHECK_CUDA(x) |
| #define | HLPT_CHECK_DEVICE(x, dev) |
| #define | HL_PYTORCH_API_VERSION 12 |
| #define | HL_PT_DEFINE_TYPECHECK(ctype, ttype, _3) |
Functions | |
| const halide_device_interface_t * | halide_cuda_device_interface () |
| std::vector< int > | Halide::PyTorch::get_dims (const at::Tensor tensor) |
| template<class scalar_t> | |
| void | Halide::PyTorch::check_type (at::Tensor &tensor) |
| Halide::PyTorch::AT_FORALL_SCALAR_TYPES_WITH_COMPLEX (HL_PT_DEFINE_TYPECHECK) | |
| template<class scalar_t> | |
| Buffer< scalar_t > | Halide::PyTorch::wrap (at::Tensor &tensor) |
| template<class scalar_t> | |
| Buffer< scalar_t > | Halide::PyTorch::wrap_cuda (at::Tensor &tensor) |
Set of utility functions to wrap PyTorch tensors into Halide buffers, making sure the data in on the correct device (CPU/GPU).
This header is included in each generated op by the PyTorch CodeGen.
Definition in file HalidePyTorchHelpers.h.
| #define HLPT_CHECK_CONTIGUOUS | ( | x | ) |
Definition at line 21 of file HalidePyTorchHelpers.h.
| #define HLPT_CHECK_CUDA | ( | x | ) |
Definition at line 22 of file HalidePyTorchHelpers.h.
| #define HLPT_CHECK_DEVICE | ( | x, | |
| dev ) |
Definition at line 23 of file HalidePyTorchHelpers.h.
| #define HL_PYTORCH_API_VERSION 12 |
Definition at line 51 of file HalidePyTorchHelpers.h.
| #define HL_PT_DEFINE_TYPECHECK | ( | ctype, | |
| ttype, | |||
| _3 ) |
Definition at line 71 of file HalidePyTorchHelpers.h.
Referenced by Halide::PyTorch::AT_FORALL_SCALAR_TYPES_WITH_COMPLEX().
| const halide_device_interface_t * halide_cuda_device_interface | ( | ) |
Referenced by Halide::PyTorch::wrap_cuda().