Skip to content

Commit b80a7a7

Browse files
authored
Merge pull request #115 from pnnl/dev-new
Merge dev-new into master
2 parents d9e3259 + 7c5ba6c commit b80a7a7

448 files changed

Lines changed: 25058 additions & 14708 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/Ubuntu-latest.yml

Lines changed: 56 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
22
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
33
name: Test on Ubuntu Linux
4-
54
on:
65
push:
7-
branches: [ "master" ]
6+
branches: [ "master", "dev-new"]
87
pull_request:
9-
branches: [ "master" ]
8+
branches: [ "master", "dev-new"]
9+
workflow_dispatch:
1010

1111
env:
1212
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1313
BUILD_TYPE: Release
1414
COMET_SRC: ${{github.workspace}}
15-
15+
COMETPY_COMET_PATH: ${{github.workspace}}/build/comet/
16+
COMETPY_LLVM_PATH: ${{github.workspace}}/build/llvm/src/llvm-build
1617
jobs:
17-
build-and-test-comet:
18+
build-comet-and-dependencies:
1819
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
1920
# You can convert this to a matrix build if you need cross-platform coverage.
2021
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
@@ -33,51 +34,46 @@ jobs:
3334
with:
3435
path: |
3536
${{github.workspace}}/llvm
36-
${{github.workspace}}/blis/
37-
${{github.workspace}}/install/
38-
${{github.workspace}}/build/
37+
${{github.workspace}}/build/llvm
38+
${{github.workspace}}/build/blis
3939
key: ${{ runner.os }}-submodules
4040

41-
- name: Update git submodules
41+
- name: Build clean
4242
if: steps.cache-submodule.outputs.cache-hit != 'true'
43-
uses: actions/checkout@v3
44-
with:
45-
submodules: recursive
43+
run: mkdir ${{github.workspace}}/build && cd ${{github.workspace}}/build && cmake ../ -DCMAKE_BUILD_TYPE=Release && make
4644

47-
- name: Build llvm
48-
if: steps.cache-submodule.outputs.cache-hit != 'true'
49-
run: mkdir ${{github.workspace}}/llvm/build && cd llvm/build/ && cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="mlir;openmp;clang" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release && ninja
45+
- name: Build from cached
46+
if: steps.cache-submodule.outputs.cache-hit == 'true'
47+
run: cd ${{github.workspace}}/build && cmake ../ -DCMAKE_BUILD_TYPE=Release -DLLVM_CUSTOM_BUILD_PATH=${{github.workspace}}/build/llvm/src/llvm-build -DCMAKE_BUILD_TYPE=Release && make
5048

51-
- name: Build blis
52-
if: steps.cache-submodule.outputs.cache-hit != 'true'
53-
run: cd ${{github.workspace}} && patch -s -p0 < comet-blis.patch && cd blis && ./configure --prefix=$COMET_SRC/install --disable-shared auto && make && make install
5449

55-
- name: Build COMET
56-
# Build your program with the given configuration
57-
run: rm -rf ${{github.workspace}}/build && mkdir ${{github.workspace}}/build && cd ${{github.workspace}}/build && cmake -G Ninja .. -DMLIR_DIR=${{github.workspace}}/llvm/build/lib/cmake/mlir -DLLVM_DIR=${{github.workspace}}/llvm/build/lib/cmake/llvm -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release && ninja
50+
test-comet-backend:
5851

59-
# test-comet-backend:
60-
61-
# needs: build-comet
62-
# runs-on: ubuntu-latest
52+
needs: build-comet-and-dependencies
53+
runs-on: ubuntu-latest
6354

64-
# steps:
65-
# - uses: actions/checkout@v4
66-
# # - uses: lukka/get-cmake@latest
67-
# - name: Install CMake
68-
# run: sudo apt-get install cmake && sudo apt-get install ninja-build
55+
steps:
56+
- uses: actions/checkout@v4
57+
# - uses: lukka/get-cmake@latest
58+
- name: Install CMake
59+
run: sudo apt-get install cmake && sudo apt-get install ninja-build
6960

70-
# - name: Cache Submodules
71-
# id: cache-submodule
72-
# uses: actions/cache@v4
73-
# # if: always()
74-
# with:
75-
# path: |
76-
# ${{github.workspace}}/llvm
77-
# ${{github.workspace}}/blis/
78-
# ${{github.workspace}}/install/
79-
# ${{github.workspace}}/build/
80-
# key: ${{ runner.os }}-submodules
61+
62+
- name: Cache Submodules
63+
id: cache-submodule
64+
uses: actions/cache@v4
65+
# if: always()
66+
with:
67+
path: |
68+
${{github.workspace}}/llvm
69+
${{github.workspace}}/build/llvm
70+
${{github.workspace}}/build/blis
71+
key: ${{ runner.os }}-submodules
72+
73+
- name: Build COMET
74+
working-directory: ${{github.workspace}}/build/
75+
# Build your program with the given configuration
76+
run: cmake .. -DLLVM_CUSTOM_BUILD_PATH=${{github.workspace}}/build/llvm/src/llvm-build -DCMAKE_BUILD_TYPE=Release && make
8177

8278
- name: Initialize Python 3.11
8379
uses: actions/setup-python@v4
@@ -91,7 +87,7 @@ jobs:
9187
sudo apt-get install -y python3-pip
9288
9389
- name: Test
94-
working-directory: ${{github.workspace}}/build
90+
working-directory: ${{github.workspace}}/build/comet/
9591
shell: bash
9692

9793
run: ninja check-comet-integration
@@ -129,7 +125,7 @@ jobs:
129125
# cargo test
130126

131127
test-cometpy:
132-
needs: build-and-test-comet
128+
needs: build-comet-and-dependencies
133129
runs-on: ubuntu-latest
134130
steps:
135131
- uses: actions/checkout@v4
@@ -141,9 +137,8 @@ jobs:
141137
with:
142138
path: |
143139
${{github.workspace}}/llvm
144-
${{github.workspace}}/blis/
145-
${{github.workspace}}/install/
146-
${{github.workspace}}/build/
140+
${{github.workspace}}/build/llvm
141+
${{github.workspace}}/build/blis
147142
key: ${{ runner.os }}-submodules
148143

149144
- name: Initialize Python 3.11
@@ -152,10 +147,23 @@ jobs:
152147
with:
153148
python-version: 3.11
154149

150+
- name: Install python dependencies
151+
run: |
152+
sudo apt-get install -y python3-pip
153+
154+
- name: Build COMET
155+
working-directory: ${{github.workspace}}/build/
156+
# Build your program with the given configuration
157+
run: cmake .. -DLLVM_CUSTOM_BUILD_PATH=${{github.workspace}}/build/llvm/src/llvm-build -DCMAKE_BUILD_TYPE=Release && make
158+
159+
155160
- name: Setup cometPy
156161
run: cd ${{github.workspace}}/frontends/numpy-scipy/ && pip3 install -e .
157-
162+
163+
- name: Install PyTest
164+
run: pip3 install -U pytest
165+
158166
- name: Test CometPy
159167
working-directory: ${{github.workspace}}/frontends/numpy-scipy/integration_tests/
160168

161-
run: python3 numpy_integration.py -v
169+
run: pytest

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ lit.site.cfg.py
1919
.vscode
2020
/.idea
2121

22-
# External software
22+
# Clangd
23+
/.cache
24+

.gitmodules

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,18 @@
77
[submodule "triton"]
88
path = triton
99
url = https://github.com/triton-lang/triton.git
10+
[submodule "tools/llvm-spirv"]
11+
path = tools/llvm-spirv
12+
url = https://github.com/llvm/llvm-project.git
13+
branch = release/7.x
14+
[submodule "tools/spirv-llvm-tranlate"]
15+
path = tools/spirv-llvm-tranlate
16+
url = https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git
17+
branch = llvm_release_70
18+
[submodule "tools/spirv-llvm-translate"]
19+
path = tools/spirv-llvm-translate
20+
url = https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git
21+
branch = llvm_release_70
22+
[submodule "runtimes/mcl"]
23+
path = runtimes/mcl
24+
url = https://github.com/pnnl/mcl.git

0 commit comments

Comments
 (0)