From df338528660182c9bd95e50550123d532067a0c0 Mon Sep 17 00:00:00 2001
From: Xu Zhao <xzhao9@meta.com>
Date: Mon, 9 Dec 2024 19:09:57 -0500
Subject: [PATCH] Remove ci build

---
 .ci/tritonbench/install.sh      |  2 +-
 .ci/tritonbench/test-install.sh |  2 +-
 install.py                      | 19 +++++--------------
 3 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/.ci/tritonbench/install.sh b/.ci/tritonbench/install.sh
index 9e01d62d..c30ab81c 100644
--- a/.ci/tritonbench/install.sh
+++ b/.ci/tritonbench/install.sh
@@ -11,4 +11,4 @@ tritonbench_dir=$(dirname "$(readlink -f "$0")")/../..
 cd ${tritonbench_dir}
 
 # Install Tritonbench and all its customized packages
-python install.py --all --ci
+python install.py --all
diff --git a/.ci/tritonbench/test-install.sh b/.ci/tritonbench/test-install.sh
index 0b6d1461..a86532bf 100644
--- a/.ci/tritonbench/test-install.sh
+++ b/.ci/tritonbench/test-install.sh
@@ -11,4 +11,4 @@ tritonbench_dir=$(dirname "$(readlink -f "$0")")/../..
 cd ${tritonbench_dir}
 
 # Install Tritonbench and all its customized packages
-python install.py --all --test --ci
+python install.py --all --test
diff --git a/install.py b/install.py
index a288b2da..f30a1702 100644
--- a/install.py
+++ b/install.py
@@ -56,27 +56,19 @@ def test_fbgemm():
 def install_fa2(compile=False, ci=False):
     if compile:
         # compile from source (slow)
-        env = os.environ.copy()
-        # limit max jobs to save memory in CI
-        if ci:
-            env["MAX_JOBS"] = "1"
         FA2_PATH = REPO_PATH.joinpath("submodules", "flash-attention")
         cmd = [sys.executable, "setup.py", "install"]
-        subprocess.check_call(cmd, cwd=str(FA2_PATH.resolve()), env=env)
+        subprocess.check_call(cmd, cwd=str(FA2_PATH.resolve()))
     else:
         # Install the pre-built binary
         cmd = ["pip", "install", "flash-attn", "--no-build-isolation"]
         subprocess.check_call(cmd)
 
 
-def install_fa3(ci=False):
+def install_fa3():
     FA3_PATH = REPO_PATH.joinpath("submodules", "flash-attention", "hopper")
-    env = os.environ.copy()
-    # limit max jobs to save memory in CI
-    if ci:
-        env["MAX_JOBS"] = "1"
     cmd = [sys.executable, "setup.py", "install"]
-    subprocess.check_call(cmd, cwd=str(FA3_PATH.resolve()), env=env)
+    subprocess.check_call(cmd, cwd=str(FA3_PATH.resolve()))
 
 
 def install_liger():
@@ -117,7 +109,6 @@ def setup_hip(args: argparse.Namespace):
         "--all", action="store_true", help="Install all custom kernel repos"
     )
     parser.add_argument("--test", action="store_true", help="Run tests")
-    parser.add_argument("--ci", action="store_true", help="Indicate running in CI environment.")
     args = parser.parse_args()
 
     if args.all and is_hip():
@@ -133,10 +124,10 @@ def setup_hip(args: argparse.Namespace):
         install_fbgemm()
     if args.fa2 or args.all:
         logger.info("[tritonbench] installing fa2 from source...")
-        install_fa2(compile=True, ci=args.ci)
+        install_fa2(compile=True)
     if args.fa3 or args.all:
         logger.info("[tritonbench] installing fa3...")
-        install_fa3(ci=args.ci)
+        install_fa3()
     if args.colfax or args.all:
         logger.info("[tritonbench] installing colfax cutlass-kernels...")
         from tools.cutlass_kernels.install import install_colfax_cutlass