1 #pragma once 2 3 #include <c10/core/MemoryFormat.h> 4 #include <torch/csrc/Export.h> 5 #include <torch/csrc/utils/python_stub.h> 6 7 namespace torch::utils { 8 9 void initializeMemoryFormats(); 10 11 // This methods returns a borrowed reference! 12 TORCH_PYTHON_API PyObject* getTHPMemoryFormat(c10::MemoryFormat); 13 14 } // namespace torch::utils 15