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-19 02:32 +0800

1import torch 

2 

3CORE_NUM = 40 

4 

5try: 

6 import triton.runtime.driver as driver 

7 

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 

13 

14__all__ = [ 

15 "CORE_NUM", 

16]