Update on "Hide all symbols (except stable/headeronly/shim) if TORCH_STABLE_ONLY is defined"

[ghstack-poisoned]
This commit is contained in:
Mikayla Gawarecki
2025-11-11 09:15:52 -08:00
parent 4d85071f1d
commit c500c5cc93

View File

@ -360,9 +360,10 @@ def check_stable_c_shim_symbols(install_root: Path) -> None:
# Check if the stable C shim exists
stable_shim = include_dir / "torch" / "csrc" / "stable" / "c" / "shim.h"
if not stable_shim.exists():
# Skip test if stable C shim doesn't exist
return
raise RuntimeError("Could not find stable c shim")
# There are no constexpr symbols etc., so we need to actually use functions
# so that some symbols are found.
test_stable_shim_content = """
#include <torch/csrc/stable/c/shim.h>
int main() {