mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15899 Add PyTorchPredictorContainer to support multiple jit script modules Reviewed By: pritamdamania87 Differential Revision: D13596139 fbshipit-source-id: 3ce0bdf2f4dbba7aa1d20e824d03e5ac98f5d887
24 lines
557 B
C++
24 lines
557 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
#include "c10/macros/Macros.h"
|
|
|
|
namespace caffe2 {
|
|
namespace serialize {
|
|
|
|
// this is the interface for the (file/stream/memory) reader in
|
|
// PyTorchStreamReader. with this interface, we can extend the support
|
|
// besides standard istream
|
|
class CAFFE2_API ReadAdapterInterface {
|
|
public:
|
|
virtual size_t size() const = 0;
|
|
virtual size_t read(uint64_t pos, void* buf, size_t n, const char* what = "")
|
|
const = 0;
|
|
virtual ~ReadAdapterInterface();
|
|
};
|
|
|
|
} // namespace serialize
|
|
} // namespace caffe2
|