mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22882 Test Plan: Imported from OSS Differential Revision: D16270332 Pulled By: zdevito fbshipit-source-id: 714f293493965b13e471945fde11831a04875604
29 lines
No EOL
670 B
C++
29 lines
No EOL
670 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/jit/source_range_serialization.h>
|
|
|
|
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<SourceRange> findSourceRangeThatGenerated(
|
|
const SourceRange& range) override;
|
|
|
|
private:
|
|
at::DataPtr data;
|
|
size_t size;
|
|
|
|
void unpickle();
|
|
|
|
std::shared_ptr<SourceRangeDeserializer> deserializer;
|
|
std::shared_ptr<SourceRangeRecords> unpickled_records;
|
|
};
|
|
|
|
} // namespace jit
|
|
} // namespace torch
|