xref: /aosp_15_r20/external/pytorch/test/cpp_extensions/torch_test_cpp_extension/__init__.py (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1"""
2This is a device backend extension used for testing.
3See this RFC: https://github.com/pytorch/pytorch/issues/122468
4"""
5
6import os
7
8
9def _autoload():
10    # Set the environment variable to true in this entrypoint
11    os.environ["IS_CUSTOM_DEVICE_BACKEND_IMPORTED"] = "1"
12