Files
tilelang/testing/python/components/test_tilelang_env.py
T
Lei Wang 72be4909bb [Refactor] Refactor env into a more flexible version (#740)
* Fix environment variable name for compilation print setting in `env.py`

* Remove deprecated test file for warp specialized pass configuration and refactor environment variable access in `env.py` to utilize a centralized `EnvVar` class for better management and clarity.

* lint fix

* Refactor cache check to use `env.is_cache_enabled()` for consistency in `tuner.py`
2025-08-19 17:14:41 +08:00

18 lines
477 B
Python

import tilelang
import os
def test_env_var():
# test default value
assert tilelang.env.TILELANG_PRINT_ON_COMPILATION == "1"
# test forced value
os.environ["TILELANG_PRINT_ON_COMPILATION"] = "0"
assert tilelang.env.TILELANG_PRINT_ON_COMPILATION == "0"
# test forced value with class method
tilelang.env.TILELANG_PRINT_ON_COMPILATION = "1"
assert tilelang.env.TILELANG_PRINT_ON_COMPILATION == "1"
if __name__ == "__main__":
test_env_var()