Shortcuts

Struct WeakOrStrongCompilationUnit

Page Contents

Struct Documentation

struct c10::WeakOrStrongCompilationUnit

Public Functions

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

Public Members

c10::optional<std::shared_ptr<torch::jit::CompilationUnit>> strong_ptr_
c10::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