Skip to content

Commit 7a65e90

Browse files
committed
check in TUs
1 parent e01b6cd commit 7a65e90

Some content is hidden

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

52 files changed

+814
-285
lines changed

.github/workflows/build_test_release_eudsl.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
description: 'Run the build with a tmate session ONLY in case of failure'
1414
required: false
1515
default: false
16+
eudslpy_disable_compile_opt:
17+
type: boolean
18+
description: 'use -O0 to build'
19+
required: false
20+
default: true
1621
pull_request:
1722
paths:
1823
- ".github/workflows/build_test_release_eudsl.yml"
@@ -126,6 +131,11 @@ jobs:
126131
- name: "Build eudsl-py"
127132
if: ${{ ! startsWith(matrix.os, 'windows') }}
128133
run: |
134+
# prevent OOM on free GHA
135+
# TODO(max): implement sharding instead
136+
export DISABLE_COMPILE_OPT="${{ inputs.debug_with_tmate }}"
137+
export CC=clang
138+
export CXX=clang++
129139
$python3_command -m cibuildwheel "$PWD/projects/eudsl-py" --output-dir wheelhouse
130140
131141
- name: Upload artifacts

projects/eudsl-py/CMakeLists.txt

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,51 @@ nanobind_add_module(eudslpy_ext
380380
NB_STATIC
381381
NB_DOMAIN eudsl
382382
src/eudslpy_ext.cpp
383+
src/EUDSLGenacc.inc.cpp
384+
src/EUDSLGenaffine.inc.cpp
385+
src/EUDSLGenamdgpu.inc.cpp
386+
src/EUDSLGenamx.inc.cpp
387+
src/EUDSLGenarith.inc.cpp
388+
src/EUDSLGenarm_neon.inc.cpp
389+
src/EUDSLGenarm_sme.inc.cpp
390+
src/EUDSLGenarm_sve.inc.cpp
391+
src/EUDSLGenasync.inc.cpp
392+
src/EUDSLGenbufferization.inc.cpp
393+
src/EUDSLGencf.inc.cpp
394+
src/EUDSLGencomplex.inc.cpp
395+
src/EUDSLGenDLTIDialect.inc.cpp
396+
# src/EUDSLGenemitc.inc.cpp
397+
src/EUDSLGenfunc.inc.cpp
398+
src/EUDSLGengpu.inc.cpp
399+
src/EUDSLGenindex.inc.cpp
400+
# src/EUDSLGenirdl.inc.cpp
401+
# src/EUDSLGenlinalg.inc.cpp
402+
# src/EUDSLGenLLVM.inc.cpp
403+
src/EUDSLGenmath.inc.cpp
404+
src/EUDSLGenmemref.inc.cpp
405+
src/EUDSLGenmesh.inc.cpp
406+
src/EUDSLGenml_program.inc.cpp
407+
src/EUDSLGenmpi.inc.cpp
408+
src/EUDSLGennvgpu.inc.cpp
409+
src/EUDSLGenNVVM.inc.cpp
410+
# src/EUDSLGenomp.inc.cpp
411+
src/EUDSLGenpdl.inc.cpp
412+
src/EUDSLGenpdl_interp.inc.cpp
413+
src/EUDSLGenpolynomial.inc.cpp
414+
src/EUDSLGenptr.inc.cpp
415+
src/EUDSLGenquant.inc.cpp
416+
src/EUDSLGenROCDL.inc.cpp
417+
# src/EUDSLGenscf.inc.cpp
418+
# src/EUDSLGenshape.inc.cpp
419+
src/EUDSLGensparse_tensor.inc.cpp
420+
# src/EUDSLGenspirv.inc.cpp
421+
src/EUDSLGentensor.inc.cpp
422+
src/EUDSLGentosa.inc.cpp
423+
src/EUDSLGentransform.inc.cpp
424+
src/EUDSLGenub.inc.cpp
425+
# src/EUDSLGenvector.inc.cpp
426+
src/EUDSLGenx86vector.inc.cpp
427+
# src/EUDSLGenxegpu.inc.cpp
383428
)
384429
add_dependencies(eudslpy_ext
385430
EUDSLGenacc
@@ -400,7 +445,7 @@ add_dependencies(eudslpy_ext
400445
EUDSLGengpu
401446
EUDSLGenindex
402447
# EUDSLGenirdl
403-
EUDSLGenlinalg
448+
# EUDSLGenlinalg
404449
# EUDSLGenLLVM
405450
EUDSLGenmath
406451
EUDSLGenmemref
@@ -416,10 +461,10 @@ add_dependencies(eudslpy_ext
416461
EUDSLGenptr
417462
EUDSLGenquant
418463
EUDSLGenROCDL
419-
EUDSLGenscf
420-
EUDSLGenshape
464+
# EUDSLGenscf
465+
# EUDSLGenshape
421466
EUDSLGensparse_tensor
422-
EUDSLGenspirv
467+
# EUDSLGenspirv
423468
EUDSLGentensor
424469
EUDSLGentosa
425470
EUDSLGentransform
@@ -433,6 +478,10 @@ set_target_properties(eudslpy_ext
433478
LIBRARY_OUTPUT_DIRECTORY "${EUDSLPY_SRC_DIR}/eudsl"
434479
)
435480
target_link_libraries(eudslpy_ext PRIVATE MLIR)
481+
# hack - on GHA, linux, the build OOMs
482+
if ("$ENV{DISABLE_COMPILE_OPT}" MATCHES "true")
483+
target_compile_options(eudslpy_ext PRIVATE -O0)
484+
endif()
436485

437486
# hack so we can move libMLIR and libLLVM into the wheel
438487
# see AddLLVM.cmake#llvm_setup_rpath

projects/eudsl-py/pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,13 @@ environment-pass = [
4242
"MLIR_DIR",
4343
"Clang_DIR",
4444
"CMAKE_GENERATOR",
45-
"CMAKE_PREFIX_PATH"
45+
"CMAKE_PREFIX_PATH",
46+
"DISABLE_COMPILE_OPT",
47+
"CC",
48+
"CXX"
49+
]
50+
51+
[tool.cibuildwheel.linux]
52+
before-build = [
53+
"yum install -y clang",
4654
]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
#include "mlir/InitAllDialects.h"
3+
#include <nanobind/nanobind.h>
4+
#include "type_casters.h"
5+
namespace nb = nanobind;
6+
using namespace nb::literals;
7+
using namespace mlir;
8+
using namespace llvm;
9+
void populateDLTIDialectModule(nb::module_ &m) {
10+
#include "EUDSLGenDLTIDialect.cpp.inc"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
#include "mlir/InitAllDialects.h"
3+
#include <nanobind/nanobind.h>
4+
#include "type_casters.h"
5+
namespace nb = nanobind;
6+
using namespace nb::literals;
7+
using namespace mlir;
8+
using namespace llvm;
9+
void populateLLVMModule(nb::module_ &m) {
10+
#include "EUDSLGenLLVM.cpp.inc"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
#include "mlir/InitAllDialects.h"
3+
#include <nanobind/nanobind.h>
4+
#include "type_casters.h"
5+
namespace nb = nanobind;
6+
using namespace nb::literals;
7+
using namespace mlir;
8+
using namespace llvm;
9+
void populateNVVMModule(nb::module_ &m) {
10+
#include "EUDSLGenNVVM.cpp.inc"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
#include "mlir/InitAllDialects.h"
3+
#include <nanobind/nanobind.h>
4+
#include "type_casters.h"
5+
namespace nb = nanobind;
6+
using namespace nb::literals;
7+
using namespace mlir;
8+
using namespace llvm;
9+
void populateROCDLModule(nb::module_ &m) {
10+
#include "EUDSLGenROCDL.cpp.inc"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
#include "mlir/InitAllDialects.h"
3+
#include <nanobind/nanobind.h>
4+
#include "type_casters.h"
5+
namespace nb = nanobind;
6+
using namespace nb::literals;
7+
using namespace mlir;
8+
using namespace llvm;
9+
void populateaccModule(nb::module_ &m) {
10+
#include "EUDSLGenacc.cpp.inc"
11+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
#include "mlir/InitAllDialects.h"
3+
#include "mlir/IR/IntegerSet.h"
4+
#include "mlir/Dialect/Affine/IR/AffineValueMap.h"
5+
#include <nanobind/nanobind.h>
6+
#include "type_casters.h"
7+
namespace nb = nanobind;
8+
using namespace nb::literals;
9+
using namespace mlir;
10+
using namespace llvm;
11+
void populateaffineModule(nb::module_ &m) {
12+
#include "EUDSLGenaffine.cpp.inc"
13+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
#include "mlir/InitAllDialects.h"
3+
#include <nanobind/nanobind.h>
4+
#include "type_casters.h"
5+
namespace nb = nanobind;
6+
using namespace nb::literals;
7+
using namespace mlir;
8+
using namespace llvm;
9+
void populateamdgpuModule(nb::module_ &m) {
10+
#include "EUDSLGenamdgpu.cpp.inc"
11+
}

0 commit comments

Comments
 (0)