Import python_compat.h

This commit is contained in:
Guilherme Leobas
2025-10-16 21:51:10 -03:00
parent 576e35e176
commit 3884ec37f3
2 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,16 @@
// initializers that are not supported in older C++ standards, but is supported
// in C.
#include <torch/csrc/utils/python_compat.h>
#if IS_PYTHON_3_14_PLUS
#pragma message("is Python 3.14+")
#endif
#if defined(_WIN32)
#pragma message("WIN32 defined")
#endif
#if IS_PYTHON_3_14_PLUS && defined(_WIN32)
#define Py_BUILD_CORE

View File

@ -1,5 +1,7 @@
#pragma once
#include <torch/csrc/utils/python_compat.h>
#if IS_PYTHON_3_14_PLUS && defined(_WIN32)
#ifdef __cplusplus