Halide icon indicating copy to clipboard operation
Halide copied to clipboard

No longer silently hide errors in Metal completion handlers (alternative approach)

Open shoaibkamil opened this issue 1 year ago • 3 comments

As discussed in the dev meeting, here is an alternative approach for fixing #7780. Now, the runtime saves an error during the callback from a failed command buffer, and reports the error back at the next opportunity for reporting. Note that this means that a pipeline may get an error that should be attributed to the previous pipeline, but additional error information can be added (e.g. prepending the error message with the name of the kernel that caused it) if wanted.

shoaibkamil avatar May 28 '24 16:05 shoaibkamil

Sorry @steven-johnson, I brain-farted and hadn't pushed the branch I intended to push when I opened this. Should be correct now.

shoaibkamil avatar May 28 '24 17:05 shoaibkamil

@shoaibkamil I recommend pre-pending the error message with something that reminds the user that this error has happened unexpectedly during the execution of a previous pipeline.

slomp avatar May 28 '24 19:05 slomp

C:\build_bot\worker\halide-testbranch-main-llvm19-x86-64-windows-cmake\halide-source\test\correctness\gpu_metal_completion_handler_error_check.cpp(2): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

steven-johnson avatar May 28 '24 20:05 steven-johnson

@steven-johnson I've substantially revamped the API here to enable users to pass a user context. PTAL

shoaibkamil avatar Jun 10 '24 18:06 shoaibkamil

Investigating crash, and will add tests to makefile.

shoaibkamil avatar Jun 11 '24 15:06 shoaibkamil

All green finally, modulor vulkan errors.

shoaibkamil avatar Jun 13 '24 14:06 shoaibkamil