Skip to content

Commit b61a556

Browse files
cyyeverpytorchmergebot
authored andcommitted
Turn onnx functions into static (pytorch#147598)
To avoid exposing ONNX symbols. Pull Request resolved: pytorch#147598 Approved by: https://github.com/justinchuby
1 parent 3395da7 commit b61a556

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch/csrc/jit/serialization/export.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ class GraphEncoder {
414414
static constexpr size_t ParamSizeThresholdForExternalStorage = 1024;
415415
};
416416

417-
onnx::TensorProto_DataType ATenTypeToOnnxType(at::ScalarType at_type) {
417+
static onnx::TensorProto_DataType ATenTypeToOnnxType(at::ScalarType at_type) {
418418
switch (at_type) {
419419
case at::kDouble:
420420
return onnx::TensorProto_DataType_DOUBLE;
@@ -459,7 +459,7 @@ onnx::TensorProto_DataType ATenTypeToOnnxType(at::ScalarType at_type) {
459459
}
460460
}
461461

462-
onnx::AttributeProto_AttributeType ATenAttributeKindToOnnxAttributeType(
462+
static onnx::AttributeProto_AttributeType ATenAttributeKindToOnnxAttributeType(
463463
AttributeKind at_kind,
464464
const jit::Symbol name) {
465465
switch (at_kind) {

0 commit comments

Comments
 (0)