Shortcuts

Struct WeakOrStrongCompilationUnit

Page Contents

Struct Documentation

struct WeakOrStrongCompilationUnit

Public Functions

inline explicit WeakOrStrongCompilationUnit(std::shared_ptr<torch::jit::CompilationUnit> shared_cu)
inline explicit WeakOrStrongCompilationUnit(std::weak_ptr<torch::jit::CompilationUnit> weak_cu)
inline std::shared_ptr<torch::jit::CompilationUnit> getStrongRefOrThrow() const
inline std::weak_ptr<torch::jit::CompilationUnit> getWeakRefOrThrow() const
inline bool holdingStrongRef() const
inline bool holdingEmptyStrongRef() const

Public Members

std::optional<std::shared_ptr<torch::jit::CompilationUnit>> strong_ptr_
std::optional<std::weak_ptr<torch::jit::CompilationUnit>> weak_ptr_

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources