diff --git a/build.toml b/build.toml index 06d619c6caf9aa61ae6bcbc14c272ebf32dee1eb..f1cf63be862af05e84334ce68a8d3d604252f13c 100644 --- a/build.toml +++ b/build.toml @@ -5,12 +5,12 @@ version = "0.0.1" name = "moe" src = [ "core/scalar_type.hpp", - "ext-torch/registration.h", - "ext-torch/torch_binding.cpp", - "ext-torch/torch_binding.h", + "torch-ext/registration.h", + "torch-ext/torch_binding.cpp", + "torch-ext/torch_binding.h", ] include = ["."] -pyroot = "ext-torch" +pyroot = "torch-ext" pyext = ["py", "json"] [kernel.fp8] diff --git a/ext-torch/moe/utils/__init__.py b/tests/__init__.py similarity index 100% rename from ext-torch/moe/utils/__init__.py rename to tests/__init__.py diff --git a/test/__init__.py b/tests/kernels/__init__.py similarity index 100% rename from test/__init__.py rename to tests/kernels/__init__.py diff --git a/test/kernels/test_moe.py b/tests/kernels/test_moe.py similarity index 100% rename from test/kernels/test_moe.py rename to tests/kernels/test_moe.py diff --git a/test/kernels/utils.py b/tests/kernels/utils.py similarity index 100% rename from test/kernels/utils.py rename to tests/kernels/utils.py diff --git a/ext-torch/moe/__init__.py b/torch-ext/moe/__init__.py similarity index 100% rename from ext-torch/moe/__init__.py rename to torch-ext/moe/__init__.py diff --git a/ext-torch/moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json b/torch-ext/moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json rename to torch-ext/moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json diff --git a/ext-torch/moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json b/torch-ext/moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json rename to torch-ext/moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json diff --git a/ext-torch/moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json b/torch-ext/moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json rename to torch-ext/moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json diff --git a/ext-torch/moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json b/torch-ext/moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json rename to torch-ext/moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json diff --git a/ext-torch/moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json b/torch-ext/moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json rename to torch-ext/moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json diff --git a/ext-torch/moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json b/torch-ext/moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json rename to torch-ext/moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json diff --git a/ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json b/torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json rename to torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json diff --git a/ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json b/torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json rename to torch-ext/moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json diff --git a/ext-torch/moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json b/torch-ext/moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json rename to torch-ext/moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json diff --git a/ext-torch/moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json b/torch-ext/moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json rename to torch-ext/moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json diff --git a/ext-torch/moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json b/torch-ext/moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json rename to torch-ext/moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json diff --git a/ext-torch/moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json b/torch-ext/moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json similarity index 100% rename from ext-torch/moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json rename to torch-ext/moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json diff --git a/ext-torch/moe/configs/README b/torch-ext/moe/configs/README similarity index 100% rename from ext-torch/moe/configs/README rename to torch-ext/moe/configs/README diff --git a/ext-torch/moe/fp8.py b/torch-ext/moe/fp8.py similarity index 100% rename from ext-torch/moe/fp8.py rename to torch-ext/moe/fp8.py diff --git a/ext-torch/moe/fused_marlin_moe.py b/torch-ext/moe/fused_marlin_moe.py similarity index 100% rename from ext-torch/moe/fused_marlin_moe.py rename to torch-ext/moe/fused_marlin_moe.py diff --git a/ext-torch/moe/fused_moe.py b/torch-ext/moe/fused_moe.py similarity index 100% rename from ext-torch/moe/fused_moe.py rename to torch-ext/moe/fused_moe.py diff --git a/ext-torch/moe/platforms.py b/torch-ext/moe/platforms.py similarity index 100% rename from ext-torch/moe/platforms.py rename to torch-ext/moe/platforms.py diff --git a/ext-torch/moe/scalar_type.py b/torch-ext/moe/scalar_type.py similarity index 100% rename from ext-torch/moe/scalar_type.py rename to torch-ext/moe/scalar_type.py diff --git a/test/kernels/__init__.py b/torch-ext/moe/utils/__init__.py similarity index 100% rename from test/kernels/__init__.py rename to torch-ext/moe/utils/__init__.py diff --git a/ext-torch/moe/utils/marlin_utils.py b/torch-ext/moe/utils/marlin_utils.py similarity index 100% rename from ext-torch/moe/utils/marlin_utils.py rename to torch-ext/moe/utils/marlin_utils.py diff --git a/ext-torch/moe/utils/marlin_utils_test.py b/torch-ext/moe/utils/marlin_utils_test.py similarity index 100% rename from ext-torch/moe/utils/marlin_utils_test.py rename to torch-ext/moe/utils/marlin_utils_test.py diff --git a/ext-torch/moe/utils/quant_utils.py b/torch-ext/moe/utils/quant_utils.py similarity index 100% rename from ext-torch/moe/utils/quant_utils.py rename to torch-ext/moe/utils/quant_utils.py diff --git a/ext-torch/registration.h b/torch-ext/registration.h similarity index 100% rename from ext-torch/registration.h rename to torch-ext/registration.h diff --git a/ext-torch/torch_binding.cpp b/torch-ext/torch_binding.cpp similarity index 100% rename from ext-torch/torch_binding.cpp rename to torch-ext/torch_binding.cpp diff --git a/ext-torch/torch_binding.h b/torch-ext/torch_binding.h similarity index 100% rename from ext-torch/torch_binding.h rename to torch-ext/torch_binding.h