[RFC] Migrate TOPI into the tvm main package

TOPI is the TVM operator inventary that supports collections of tensor expression operators. It was designed to sit on top of the tvm.te layer and the separate package makes sense when tvm started with mainly a te focused project.

Given the move towards the unified infra design, we already starts to introduce dependencies of TOPI from tvm.relay, such dependency.

As a result, this RFC proposes to migrate TOPI into the tvm main package as a subnamespace. The migration will also simplify the packagin of tvm, to only require installation of a single python package.

Please share your thoughts


I’m definitely in favor of this refactor. Now that TOPI is tightly integrated with relay it makes perfect sense to move it to a similar namespace.

I was on the side of even separating TOPI to a different repo so that we can have a clean boundary so that we can have performance regression test for TOPI with a TVM commit hash as its dependency. However, as @tqchen pointed out, we now have strong bidirectional dependencies between TVM and TOPI, so it’s improper to separate them. Accordingly, putting them to the same package makes more sense.

Given that Relay has strong dependency to TOPI, I agree with @tqchen that TOPI shouldn’t be a separate package. Incorporating TOPI into TVM and put it as separate folder makes more sense in this case.

1 Like

thanks everyone, here is the PR https://github.com/apache/incubator-tvm/pull/6186