()
| 98 | |
| 99 | |
| 100 | def timeme(): |
| 101 | print("--------------- timeit -----------------") |
| 102 | print(f'py ={timeit.Timer("py()", globals=globals()).timeit(number=1)}') |
| 103 | gc.collect() |
| 104 | get_accelerator().empty_cache() |
| 105 | print(f'cpp ={timeit.Timer("cpp()", globals=globals()).timeit(number=1)}') |
| 106 | gc.collect() |
| 107 | get_accelerator().empty_cache() |
| 108 | print(f'apex={timeit.Timer("apex()", globals=globals()).timeit(number=1)}') |
| 109 | gc.collect() |
| 110 | get_accelerator().empty_cache() |
| 111 | |
| 112 | |
| 113 | #### line_profiler #### |
no test coverage detected