You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[TIR] Restrict tir.transform.InstallDebugSpans to host functions (#14943)
* [Bugfix] Avoid symbol conflicts in MakePackedAPI/MakeUnpackedAPI
PRs #14913 and
#14914 made analogous changes to
`MakePackedAPI` and `MakeUnpackedAPI` to handle subroutine calls.
Both PRs introduced the same symbol,
`tvm::tir::SubroutineCallRewriter`, a local utility to update internal
calls to a modified function. While each PR passed CI individually,
and was therefore able to merge, having both changes caused a
duplicate symbol.
This commit updates `MakePackedAPI` and `MakeUnpackedAPI` to place
their local utilities into anonymous namespaces, avoiding the
conflict.
* [Target] Added utility method TargetNode::HasKey()
This utility method makes it easier to determine if a target contains
a specific key.
* [TIR] Added utility method tvm::tir::IsHostFunc(const PrimFunc&)
For modules that contain both host and device functions, this utility
function checks whether a given PrimFunc is a host function, based on
the target annotation.
* [TIR] Restrict InstallDebugSpans to host functions
Previously, the `tir.InstallDebugSpans` pass required the module to
contain only a single PrimFunc. This commit relaxes the requirement,
to require a single host-side PrimFunc, and to ignore any other
device-side functions.
0 commit comments