mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: similar to https://github.com/pytorch/pytorch/pull/45696 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/51891 Reviewed By: izdeby Differential Revision: D26318646 Pulled By: seemethere fbshipit-source-id: 757194845c758a24eed2d0550866ba890e7a0b58
25 lines
757 B
C++
25 lines
757 B
C++
#pragma once
|
|
|
|
namespace torch { namespace onnx {
|
|
|
|
enum class OperatorExportTypes {
|
|
ONNX, // Strict ONNX export
|
|
ONNX_ATEN, // ONNX With ATen op everywhere
|
|
ONNX_ATEN_FALLBACK, // ONNX export with ATen fallback
|
|
RAW, // Raw export (no ONNX)
|
|
ONNX_FALLTHROUGH, // Export supported ONNX ops. Pass through unsupported ops.
|
|
};
|
|
|
|
enum class TrainingMode {
|
|
EVAL, // Inference mode
|
|
PRESERVE, // Preserve model state (eval/training)
|
|
TRAINING, // Training mode
|
|
};
|
|
|
|
// we pin IR version to version 6 (12/11/2019) instead of using
|
|
// onnx::IR_VERSION. with this change, the test_operators.py will be more
|
|
// stable. only bump it when it's necessary
|
|
static const size_t IR_VERSION = 6;
|
|
static const char* PRODUCER_VERSION = "1.9";
|
|
}} // namespace torch::onnx
|