Skip to content

Commit e8d4b33

Browse files
committed
Add opt-in flag for debug mode in unit tests.
1 parent fd4d448 commit e8d4b33

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.github/workflows/production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
bash -c "
6868
pip install --extra-index-url https://pypi.nvidia.com/ omniverse-kit && \
6969
pip install -e '.[dev,render,usd]' && \
70-
pytest -v --forked ./tests
70+
pytest -v --debug --forked ./tests
7171
"
7272
7373
- name: Run benchmarks

tests/conftest.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def pytest_addoption(parser):
148148
"--logical", action="store_true", default=False, help="Consider logical cores in default number of workers."
149149
)
150150
parser.addoption("--vis", action="store_true", default=False, help="Enable interactive viewer.")
151+
parser.addoption("--debug", action="store_true", default=False, help="Enable genesis debug mode.")
151152

152153

153154
@pytest.fixture(scope="session")
@@ -276,13 +277,8 @@ def initialize_genesis(request, backend, taichi_offline_cache):
276277
from genesis.utils.misc import ALLOCATE_TENSOR_WARNING
277278

278279
logging_level = request.config.getoption("--log-cli-level")
279-
if backend == gs.cpu:
280-
precision = "64"
281-
debug = True
282-
else:
283-
# Disabling debug mode on GPU because we are likely needing maximum performance, notably for benchmarks
284-
precision = "32"
285-
debug = False
280+
debug = request.config.getoption("--debug")
281+
precision = "64" if backend == gs.cpu else "32"
286282

287283
try:
288284
if not taichi_offline_cache:

0 commit comments

Comments
 (0)