Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/metax-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
metax-build-and-test:
runs-on: metax
runs-on: flagtree-metax
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
steps:
- name: Setup environment
Expand Down
4 changes: 2 additions & 2 deletions python/setup_tools/setup_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def handle_plugin_backend(editable):
plugin_mode = os.getenv("FLAGTREE_PLUGIN")
if plugin_mode and plugin_mode.upper() not in ["0", "OFF"]:
return
if flagtree_backend in ["iluvatar", "mthreads", "sunrise"]:
if flagtree_backend in ["iluvatar", "mthreads", "metax", "sunrise"]:
flagtree_backend_dir = Path.home() / ".flagtree" / flagtree_backend
flagtree_plugin_so = flagtree_backend + "TritonPlugin.so"
if editable is False:
Expand All @@ -341,7 +341,7 @@ def handle_plugin_backend(editable):
dst_build_plugin_path = dst_build_plugin_dir / flagtree_plugin_so
shutil.copy(src_build_plugin_path, dst_build_plugin_path)
src_install_plugin_path = flagtree_backend_dir / flagtree_plugin_so
if flagtree_backend in ("mthreads", "sunrise"):
if flagtree_backend in ("mthreads", "metax", "sunrise"):
dst_install_plugin_dir = Path(
__file__).resolve().parent.parent.parent / "third_party" / flagtree_backend / "python" / "triton" / "_C"
else:
Expand Down
10 changes: 9 additions & 1 deletion third_party/metax/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
add_subdirectory(include)
add_subdirectory(lib)

option(EDITABLE_MODE "Build in developer (editable) mode" OFF)
if(FLAGTREE_PLUGIN)
set(METAX_PLUGIN_DIR "${Python3_SITELIB}/triton/_C")
elseif(EDITABLE_MODE)
set(METAX_PLUGIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
else()
set(METAX_PLUGIN_DIR "${Python3_SITELIB}/triton/_C")
endif()
if(TRITON_BUILD_PYTHON_MODULE)
if(FLAGTREE_PLUGIN)
add_subdirectory(plugin)
Expand All @@ -12,7 +20,7 @@ if(TRITON_BUILD_PYTHON_MODULE)
NAMES
metaxTritonPlugin.so
PATHS
${CMAKE_CURRENT_SOURCE_DIR}
${METAX_PLUGIN_DIR}
REQUIRED
)
add_triton_plugin(TritonMetax
Expand Down
Loading