Skip to content

Commit d38ce97

Browse files
MasterJH5574tqchen
authored andcommitted
[Metal] Fix GetFunction of metal runtime (apache#18034)
This PR fixes a bug in `MetalModuleNode::GetFunction`. The lambda passed to autoreleasepool is supposed to return nothing. Prior to this PR, it returns a function at an early exit branch, which may cause the error of `EXC_BREAKPOINT` in Metal.
1 parent c3647bb commit d38ce97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/Utils/Library.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717
function(add_dsymutil target_name)
1818
# running dsymutil on macos to generate debugging symbols for backtraces
19-
if(APPLE)
19+
if(APPLE AND TVM_FFI_USE_LIBBACKTRACE)
2020
find_program(DSYMUTIL dsymutil)
2121
mark_as_advanced(DSYMUTIL)
2222
add_custom_command(TARGET ${target_name}

0 commit comments

Comments
 (0)