mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-12 06:44:55 +08:00
Update on "Hide all symbols (except stable/headeronly/shim) if TORCH_STABLE_ONLY is defined"
[ghstack-poisoned]
This commit is contained in:
@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user