Fixes for using Python APIs from Rust.#7085
Conversation
537bc18 to
0eb6aa5
Compare
|
cc @hypercubestart @binarybana @imalsogreg updated this |
56772fa to
ce92b07
Compare
This commit also updates the docs to remove outdated information.
ce92b07 to
08fddd3
Compare
hypercubestart
left a comment
There was a problem hiding this comment.
does this test pass now?
| let sys = py.import("tvm")?; | ||
| let version: String = sys.get("__version__")?.extract()?; | ||
| // py.run(TVMC_CODE, None, None)?; | ||
| let imported_mod = import_python(py, "tvm")?; |
There was a problem hiding this comment.
oops forgot to add the comment.
theres an ignored test test_run in this file, if everything works the ignore attribute should be removed
There was a problem hiding this comment.
This test seems to pass on most platforms but not CI, going to keep disabled until I can be sure it won't cause CI flakiness.
There was a problem hiding this comment.
ok, its strange to me that loading tvm into rust is flaky though
|
There seems to be a problem with scipy in the CI @jroesch ? |
| /// Wrapper around TVM module handle which contains an entry function. | ||
| /// The entry function can be applied to an imported module through [`entry_func`]. | ||
| /// | ||
| /// [`entry_func`]:struct.Module.html#method.entry_func |
There was a problem hiding this comment.
is this comment still true?
| let sys = py.import("tvm")?; | ||
| let version: String = sys.get("__version__")?.extract()?; | ||
| // py.run(TVMC_CODE, None, None)?; | ||
| let imported_mod = import_python(py, "tvm")?; |
There was a problem hiding this comment.
ok, its strange to me that loading tvm into rust is flaky though
| /// | ||
| /// * `config` - The configuration for the compiler. | ||
| /// * `module` - The IRModule to compile. | ||
| pub fn compile_module(config: CompilerConfig, module: IRModule) -> Result<RtModule, Error> { |
There was a problem hiding this comment.
is there a test for this?
* Rewrite the Rust Module API and change some imports causing crashes. This commit also updates the docs to remove outdated information. * Renable Python test and remove warnings * Python test still flaky * Fix broken module test * Fix broken test * Reset test file
* Rewrite the Rust Module API and change some imports causing crashes. This commit also updates the docs to remove outdated information. * Renable Python test and remove warnings * Python test still flaky * Fix broken module test * Fix broken test * Reset test file
cc @hypercubestart this is a bigger PR to fix the current bindings and enable calling them with the Python code, but it needs a bit of cleanup, there are some changes that I used to debug segfaults.