Re: [PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-05 Thread via GitHub
Lunderberg merged PR #16843: URL: https://github.com/apache/tvm/pull/16843 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail:

Re: [PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-05 Thread via GitHub
Lunderberg commented on PR #16843: URL: https://github.com/apache/tvm/pull/16843#issuecomment-2039663093 Rebased this PR onto main, since https://github.com/apache/tvm/pull/16844 has now landed. -- This is an automated message from the Apache Git Service. To respond to the message,

Re: [PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-05 Thread via GitHub
Lunderberg commented on PR #16843: URL: https://github.com/apache/tvm/pull/16843#issuecomment-2039658387 Yup, `relax::ExternFunc` is a subclass of `BaseFunc`, and can be stored directly in an `IRModule`. At some point, I want to use this to specify when the lookup of a `PackedFunc` in the

Re: [PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-04 Thread via GitHub
slyubomirsky commented on PR #16843: URL: https://github.com/apache/tvm/pull/16843#issuecomment-2038627542 Wait, a global var can be mapped to an `ExternFunc`? That's wild. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and

Re: [PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-03 Thread via GitHub
Lunderberg commented on PR #16843: URL: https://github.com/apache/tvm/pull/16843#issuecomment-2036071794 The CI failure here will be resolved with https://github.com/apache/tvm/pull/16843. -- This is an automated message from the Apache Git Service. To respond to the message, please log

Re: [PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-03 Thread via GitHub
Lunderberg commented on PR #16843: URL: https://github.com/apache/tvm/pull/16843#issuecomment-2036068681 The `GlobalVar` instances themselves don't need to be changed, only the functions to which they point. This is why the pre-transform steps don't need to modify any function bodies,

Re: [PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-03 Thread via GitHub
slyubomirsky commented on PR #16843: URL: https://github.com/apache/tvm/pull/16843#issuecomment-2036001152 Are the substituted global vars restored afterwards? I couldn't find a place where they were put back. I would be worried about these extern funcs ending up in the final module. --

Re: [PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-03 Thread via GitHub
Lunderberg commented on PR #16843: URL: https://github.com/apache/tvm/pull/16843#issuecomment-2035187347 A follow-up commit to https://github.com/apache/tvm/pull/16801 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use

[PR] [IR] Provide well-formed intermediate in ApplyPassToFunction [tvm]

2024-04-03 Thread via GitHub
Lunderberg opened a new pull request, #16843: URL: https://github.com/apache/tvm/pull/16843 Prior to this commit, `ApplyPassToFunction` removed functions from the `IRModule` to hide them from the inner `ir.transform.Pass`. The dangling `GlobalVar` references to those functions meant that