This RFC summarizes discussion in 
https://discuss.tvm.ai/t/tvm-python-project-organization-after-unified-ir/5383

We will perform the following changes to the python project.

##  Introduce Namespaces to Reflect the C++ folder structure

- _ffi FFI related logics
- runtime runtime data structures and APIs
   - We should be able to run TVM runtime by only taking _ffi and runtime folder
- relay
- tir
- target
- te

## FFI function exposure convention
Expose all ffi functions under a special _ffi file under the same namespace, 
initialize with prefix tvm.relay.op., use relative import

```python
# file: tvm/relay/op/transform.py

from . import _ffi

def add():
  return _ffi.add()
```

## Upgrade Path

- As a first step, we will keep things as backward compatible as possible by 
re-exposing the names to the top-level. 
- Then we will refer to the new names in the new namespace when necessary.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-tvm/issues/4812

Reply via email to