Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Classes | Typedefs | Functions
Halide::PyTorch Namespace Reference

## Classes
struct | UserContext

## Typedefs
typedef struct Halide::PyTorch::UserContext | UserContext

## Functions
std::vector< int > | get_dims (const at::Tensor tensor)
template<class scalar_t >
void | check_type (at::Tensor &tensor)
| AT_FORALL_SCALAR_TYPES_WITH_COMPLEX (HL_PT_DEFINE_TYPECHECK)
template<class scalar_t >
Buffer< scalar_t > | wrap (at::Tensor &tensor)
template<class scalar_t >
Buffer< scalar_t > | wrap_cuda (at::Tensor &tensor)

## Typedef Documentation

## ◆ UserContext

typedef struct Halide::PyTorch::UserContext Halide::PyTorch::UserContext

## Function Documentation

## ◆ get_dims()

std::vector< int > Halide::PyTorch::get_dims | ( | const at::Tensor | tensor | ) |
| inline

Definition at line 30 of file HalidePyTorchHelpers.h.

References Halide::cast().

Referenced by wrap(), and wrap_cuda().

## ◆ check_type()

template<class scalar_t >

void Halide::PyTorch::check_type | ( | at::Tensor & | tensor | ) |
| inline

Definition at line 41 of file HalidePyTorchHelpers.h.

References Halide::cast().

## ◆ AT_FORALL_SCALAR_TYPES_WITH_COMPLEX()

Halide::PyTorch::AT_FORALL_SCALAR_TYPES_WITH_COMPLEX | ( | HL_PT_DEFINE_TYPECHECK |  | ) |

## ◆ wrap()

template<class scalar_t >

Buffer< scalar_t > Halide::PyTorch::wrap | ( | at::Tensor & | tensor | ) |
| inline

Definition at line 84 of file HalidePyTorchHelpers.h.

References Halide::cast(), and get_dims().

## ◆ wrap_cuda()

template<class scalar_t >

Buffer< scalar_t > Halide::PyTorch::wrap_cuda | ( | at::Tensor & | tensor | ) |
| inline

Definition at line 96 of file HalidePyTorchHelpers.h.

References Halide::cast(), Halide::Runtime::Buffer< T, Dims, InClassDimStorage >::device_wrap_native(), get_dims(), halide_cuda_device_interface(), and Halide::Runtime::Buffer< T, Dims, InClassDimStorage >::set_device_dirty().