Skip to content

feat: init npu python runtime in triton test main entries. - #3

Merged
yingxudeng merged 1 commit into
xLLM-AI:mainfrom
yingxudeng:test/init-npu-test-runtime-in-triton-tests
Jul 28, 2026
Merged

yingxudeng merged 1 commit into
xLLM-AI:mainfrom
yingxudeng:test/init-npu-test-runtime-in-triton-tests

Conversation

@yingxudeng

Copy link
Copy Markdown
Collaborator

Each triton_npu gtest binary owns its own main() to probe NPU availability, so the global test environment registered in tests/npu_test_environment.cpp cannot run first deterministically. Call xllm::testing::init_npu_test_runtime() right after InitGoogleTest so aclInit, Py_InitializeEx and torch_npu import happen before any NPU API is touched, matching the guidance in npu_test_environment.h.

Each triton_npu gtest binary owns its own main() to probe NPU
availability, so the global test environment registered in
tests/npu_test_environment.cpp cannot run first deterministically.
Call xllm::testing::init_npu_test_runtime() right after
InitGoogleTest so aclInit, Py_InitializeEx and torch_npu import
happen before any NPU API is touched, matching the guidance in
npu_test_environment.h.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant