mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Bumps supported file format in anticipate of torch.div changes (#39529)
Summary: See https://github.com/pytorch/pytorch/pull/38620 for additional context. When PyTorch begins producing file format 4 with the updated div behavior it's safe for older PyTorch versions to consume it, since file format 4 only prohibits functionality. Bumping the supported file format version now gives PyTorch users on Master some leeway on updating their services that consume vs. produce PyTorch. Pull Request resolved: https://github.com/pytorch/pytorch/pull/39529 Differential Revision: D21886790 Pulled By: mruberry fbshipit-source-id: d6098eff06c26f18c3fac5cc85e5db298ba86e27
This commit is contained in:
parent
17aebe909f
commit
7d56ef27ee
|
|
@ -91,12 +91,16 @@ namespace caffe2 {
|
||||||
namespace serialize {
|
namespace serialize {
|
||||||
|
|
||||||
constexpr uint64_t kMinSupportedFileFormatVersion = 0x1L;
|
constexpr uint64_t kMinSupportedFileFormatVersion = 0x1L;
|
||||||
constexpr uint64_t kMaxSupportedFileFormatVersion = 0x3L;
|
constexpr uint64_t kMaxSupportedFileFormatVersion = 0x4L;
|
||||||
|
|
||||||
// Versions (i.e. why was the version number bumped?)
|
// Versions (i.e. why was the version number bumped?)
|
||||||
// 1. Initial version
|
// 1. Initial version
|
||||||
// 2. Removed op_version_set version numbers
|
// 2. Removed op_version_set version numbers
|
||||||
// 3. Added type tags to pickle serialization of container types
|
// 3. Added type tags to pickle serialization of container types
|
||||||
|
// 4. (Currently read-only) Will change torch.div to throw a runtime error
|
||||||
|
// when it would have performed floor division. Bumping the version counter
|
||||||
|
// will let us presever torch.div's historic behavior for programs
|
||||||
|
// serialized with file formats 1--3.
|
||||||
constexpr uint64_t kProducedFileFormatVersion = 0x3L;
|
constexpr uint64_t kProducedFileFormatVersion = 0x3L;
|
||||||
|
|
||||||
// Writer-specific constants
|
// Writer-specific constants
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user