(self, wait=False)
| 53 | TestProfiler.b.uop.buffer.allocate() |
| 54 | |
| 55 | def test_profile_kernel_run(self, wait=False): |
| 56 | runner_name = TestProfiler.runtime.name |
| 57 | with helper_collect_profile(TestProfiler.d0) as profile: |
| 58 | gs, ls = TestProfiler.prg.arg.launch_dims({}) |
| 59 | TestProfiler.runtime(TestProfiler.b.uop.buffer._buf, TestProfiler.a.uop.buffer._buf, global_size=gs, local_size=ls, wait=wait) |
| 60 | |
| 61 | profile, _ = helper_profile_filter_device(profile, TestProfiler.d0.device) |
| 62 | kernel_runs = [x for x in profile if isinstance(x, ProfileRangeEvent)] |
| 63 | assert len(kernel_runs) == 1, "one kernel run is expected" |
| 64 | assert kernel_runs[0].name == runner_name, "kernel name is not correct" |
| 65 | assert _dev_base(kernel_runs[0].device) == kernel_runs[0].device, "kernel should not be on a sub-device" |
| 66 | |
| 67 | def test_profile_kernel_run_wait(self): |
| 68 | self.test_profile_kernel_run(wait=True) |
no test coverage detected