Coverage for src/flag_gems/runtime/backend/_ascend/utils/__init__.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-23 02:03 +0800
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-23 02:03 +0800
1import torch
3CORE_NUM = 40
5try:
6 import triton.runtime.driver as driver
8 CORE_NUM = driver.active.utils.get_device_properties(torch.npu.current_device())[
9 "num_vectorcore"
10 ]
11except (ImportError, AttributeError, RuntimeError, KeyError):
12 CORE_NUM = 40
14__all__ = [
15 "CORE_NUM",
16]