Commit d321035
authored
[Relax][Frontend][NN] Fix SourceModule include resolution for installed wheels (#19822)
`SourceModule.get_includes()` hardcoded
`tvm_home()/3rdparty/tvm-ffi/...` paths that only exist in a source
checkout. In a wheel the tvm-ffi/DLPack headers ship in the separate
`tvm_ffi` package, so the existence assert failed and `nn.SourceModule`
could not compile extern sources.
This pr resolves includes via libinfo (`libinfo.find_include_path()`,
`tvm_ffi.libinfo.find_include_path()`, `find_dlpack_include_path()`),
matching `runtime/module.py` and `rpc/minrpc.py`.1 parent 244499a commit d321035
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
309 | | - | |
310 | 311 | | |
311 | | - | |
312 | | - | |
313 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
314 | 315 | | |
315 | 316 | | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
| 320 | + | |
318 | 321 | | |
319 | 322 | | |
320 | 323 | | |
| |||
0 commit comments