Coverage for src/flag_gems/runtime/error.py: 44%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.9, created at 2026-05-26 06:59 +0800

1def backend_not_support(device_name, backend_list): 

2 raise RuntimeError(f"The {device_name} device is not supported currently. ") 

3 

4 

5def device_not_found(): 

6 raise RuntimeError( 

7 "No device were detected on your machine ! \n " 

8 "Please check that your driver is complete. " 

9 ) 

10 

11 

12def register_error(e): 

13 import logging 

14 

15 logging.warning(f"Skipped registering operator: {e}") 

16 

17 

18def customized_op_replace_error(e): 

19 raise RuntimeError( 

20 e, "An exception occurred while replacing the customization operator." 

21 )