diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 45c9308c7..016d8de15 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -39,10 +39,23 @@ jobs: run: | /gitmirror/scripts/trigger_update_mirrors.sh /gitmirror/scripts/git_config.sh + - name: "Checking out repository" - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - with: - submodules: recursive + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + REPO_ADDRESS: ${{ github.server_url }}/${{ github.repository }} + run: | + git \ + -c submodule."third_party/torch-mlir".update=none \ + -c submodule."third_party/stablehlo".update=none \ + -c submodule."src/runtime_src/core/common/aiebu".update=none \ + clone \ + --recursive \ + --shallow-submodules \ + --depth 1 \ + -b $BRANCH_NAME $REPO_ADDRESS + + cd iree-amd-aie - name: Install deps run: | diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 0b9a0c9f2..7f46b2cb5 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -45,9 +45,21 @@ jobs: timezoneWindows: "Singapore Standard Time" - name: "Checking out repository" - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - with: - submodules: recursive + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + REPO_ADDRESS: ${{ github.server_url }}/${{ github.repository }} + run: | + git \ + -c submodule."third_party/torch-mlir".update=none \ + -c submodule."third_party/stablehlo".update=none \ + -c submodule."src/runtime_src/core/common/aiebu".update=none \ + clone \ + --recursive \ + --shallow-submodules \ + --depth 1 \ + -b $BRANCH_NAME $REPO_ADDRESS + + cd iree-amd-aie - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index a6228bf46..0c67c492c 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -48,9 +48,21 @@ jobs: timezoneWindows: "Singapore Standard Time" - name: "Checking out repository" - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - with: - submodules: recursive + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + REPO_ADDRESS: ${{ github.server_url }}/${{ github.repository }} + run: | + git \ + -c submodule."third_party/torch-mlir".update=none \ + -c submodule."third_party/stablehlo".update=none \ + -c submodule."src/runtime_src/core/common/aiebu".update=none \ + clone \ + --recursive \ + --shallow-submodules \ + --depth 1 \ + -b $BRANCH_NAME $REPO_ADDRESS + + cd iree-amd-aie - name: Setup Cpp uses: aminya/setup-cpp@v1 diff --git a/.gitmodules b/.gitmodules index b378f3e02..67a096370 100644 --- a/.gitmodules +++ b/.gitmodules @@ -23,11 +23,3 @@ path = third_party/iree url = https://github.com/iree-org/iree.git shallow = true -[submodule "third_party/stablehlo"] - path = third_party/iree/third_party/stablehlo - url = https://github.com/iree-org/stablehlo.git - update = none -[submodule "third_party/torch-mlir"] - path = third_party/iree/third_party/torch-mlir - url = https://github.com/iree-org/torch-mlir.git - update = none diff --git a/README.md b/README.md index 0cfe8042c..4fea5287e 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,37 @@ interfacing the AMD AIE accelerator to IREE. ## Developer Setup -These instructions assume that you have an appropriate IREE checkout side by side -with this repository have an IREE build setup in an `iree-build` directory that -is also a sibling. This is not a requirement, but instructions will need to be -changed for different paths. +**Strong recommendation**: check the CI scripts @ [.github/workflows](.github/workflows) - they do a fresh/clean +checkout and build and are exercised on every commit *and* are written such that they're simple enough to be read +by even a non-CI expert. -Preparing repository: +### Getting the repository: + +Either + +``` +# ssh +git clone --recursive git@github.com:nod-ai/iree-amd-aie.git +# https +git clone --recursive https://github.com/nod-ai/iree-amd-aie.git +``` + +or if you want a faster checkout ``` -git submodule update --init --recursive +git \ + -c submodule."third_party/torch-mlir".update=none \ + -c submodule."third_party/stablehlo".update=none \ + -c submodule."src/runtime_src/core/common/aiebu".update=none \ + clone \ + --recursive \ + --depth 1 \ + --shallow-submodules \ + https://github.com/nod-ai/iree-amd-aie.git ``` +which has the effect of not cloning entire repo histories *and* skipping nested submodules that we currently do not need. + ## Building (along with IREE) ### Just show me the CMake