#pragma once #include namespace torch { namespace jit { // Do this clownyness with virtual functions because of the split // between ATen core and torch class ConcreteSourceRangeUnpickler : public SourceRangeUnpickler { public: ConcreteSourceRangeUnpickler(at::DataPtr&& data, size_t size); c10::optional findSourceRangeThatGenerated( const SourceRange& range) override; private: at::DataPtr data; size_t size; void unpickle(); std::shared_ptr deserializer; std::shared_ptr unpickled_records; }; } // namespace jit } // namespace torch