Skip to content

Commit

Permalink
fixup - CR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
philipportner committed Nov 10, 2023
1 parent 1be19e6 commit 8f8b8dc
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 33 deletions.
2 changes: 1 addition & 1 deletion containers/daphne.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ LABEL "org.opencontainers.image.version"="$TIMESTAMP"
LABEL "org.opencontainers.image.created"="${CREATION_DATE}"
LABEL "org.opencontainers.image.revision"="${GIT_HASH}"
RUN apt-get -qq -y update && apt-get -y upgrade && apt-get -y --no-install-recommends install \
libtinfo6 libssl1.1 zlib1g python3-numpy python3-pandas lit\
libtinfo6 libssl1.1 zlib1g python3-numpy python3-pandas\
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=daphne-build $DAPHNE_DIR/bin/* /usr/local/bin
COPY --from=daphne-build $DAPHNE_DIR/lib/* /usr/local/lib
Expand Down
2 changes: 1 addition & 1 deletion doc/Codegen.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ lowerings:
- LowerAffinePass

These passes are added in the `DaphneIrExecutor::buildCodegenPipeline`
function. The `--hybrid` flag disables the `MatMulOpLoweringPass` since the
function. The `--mlir-hybrid-codegen` flag disables the `MatMulOpLoweringPass` since the
kernel implementation vastly outperforms the generated code of this pass.


Expand Down
48 changes: 24 additions & 24 deletions doc/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,30 @@ launching DAPHNE via Docker (see below) should work the same way as in a native

### Software

| tool/lib | version known to work (*) | comment |
|--------------------------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| GCC/G++ | 9.3.0 | Last checked version: 12.2 |
| clang | 10.0.0 | |
| cmake | 3.20 | On Ubuntu 20.04, install by `sudo snap install cmake --classic` to fulfill the version requirement; `apt` provides only version 3.16.3. |
| git | 2.25.1 | |
| libssl-dev | 1.1.1 | Dependency introduced while optimizing grpc build (which used to build ssl unnecessarily) |
| libpfm4-dev | 4.10 | This dependency is needed for profiling support [DAPHNE-#479] |
| lld | 10.0.0 | |
| ninja | 1.10.0 | |
| pkg-config | 0.29.1 | |
| python3 | 3.8.5 | |
| numpy | 1.19.5 | |
| pandas | 0.25.3 | |
| java (e.g. openjdk) | 11 (1.7 should be fine) | |
| gfortran | 9.3.0 | |
| uuid-dev | | |
| lit | 17.0 | Install with pip, `llvm-lit` is installed in thirdparty/build/llvm-project/bin |
| wget | | Used to fetch additional dependencies and other artefacts |
| jq | | json commandline processor used in docker image generation scripts |
| *** | *** | *** |
| CUDA SDK | 11.7.1 | Optional for CUDA ops |
| OneAPI SDK | 2022.x | Optional for OneAPI ops |
| Intel FPGA SDK or OneAPI FPGA Add-On | 2022.x | Optional for FPGAOPENCL ops |
| tool/lib | version known to work (*) | comment |
|--------------------------------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| GCC/G++ | 9.3.0 | Last checked version: 12.2 |
| clang | 10.0.0 | |
| cmake | 3.20 | On Ubuntu 20.04, install by `sudo snap install cmake --classic` to fulfill the version requirement; `apt` provides only version 3.16.3. |
| git | 2.25.1 | |
| libssl-dev | 1.1.1 | Dependency introduced while optimizing grpc build (which used to build ssl unnecessarily) |
| libpfm4-dev | 4.10 | This dependency is needed for profiling support [DAPHNE-#479] |
| lld | 10.0.0 | |
| ninja | 1.10.0 | |
| pkg-config | 0.29.1 | |
| python3 | 3.8.5 | |
| numpy | 1.19.5 | |
| pandas | 0.25.3 | |
| java (e.g. openjdk) | 11 (1.7 should be fine) | |
| gfortran | 9.3.0 | |
| uuid-dev | | |
| llvm-10-tools | 10, 15 | On Ubuntu 22.04 you may need to install a newer `llvm-*-tools` version, such as `llvm-15-tools`. |
| wget | | Used to fetch additional dependencies and other artefacts |
| jq | | json commandline processor used in docker image generation scripts |
| *** | *** | *** |
| CUDA SDK | 11.7.1 | Optional for CUDA ops |
| OneAPI SDK | 2022.x | Optional for OneAPI ops |
| Intel FPGA SDK or OneAPI FPGA Add-On | 2022.x | Optional for FPGAOPENCL ops |

### Hardware

Expand Down
3 changes: 2 additions & 1 deletion install-ubuntu-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
# limitations under the License.

# This is a convenience script to install the required packages on Ubuntu 20+ systems to compile DAPHNE
# On Ubuntu 22.04 you may need to change the version of llvm-10-tools to a newer one, such as llvm-15-tools.
sudo apt install build-essential clang cmake git libssl-dev libpfm4-dev lld ninja-build pkg-config python3-numpy \
python3-pandas default-jdk-headless gfortran uuid-dev wget unzip jq lit
python3-pandas default-jdk-headless gfortran uuid-dev wget unzip jq llvm-10-tools
2 changes: 1 addition & 1 deletion src/api/cli/DaphneUserConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ struct DaphneUserConfig {
bool use_ipa_const_propa = true;
bool use_phy_op_selection = true;
bool use_mlir_codegen = false;
bool use_mlir_hybrid_codegen = false;
bool cuda_fuse_any = false;
bool vectorized_single_queue = false;
bool prePartitionRows = false;
bool pinWorkers = false;
bool hyperthreadingEnabled = false;
bool debugMultiThreading = false;
bool use_fpgaopencl = false;
bool hybrid = false;
bool enable_profiling = false;

bool debug_llvm = false;
Expand Down
4 changes: 2 additions & 2 deletions src/api/internal/daphne_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ int startDAPHNE(int argc, const char** argv, DaphneLibResult* daphneLibRes, int
desc("Enables lowering of certain DaphneIR operations on DenseMatrix to low-level MLIR operations.")
);
static opt<bool> performHybridCodegen(
"hybrid", cat(daphneOptions),
"mlir-hybrid-codegen", cat(daphneOptions),
desc("Enables prototypical hybrid code generation combining pre-compiled kernels and MLIR code generation.")
);

Expand Down Expand Up @@ -378,7 +378,7 @@ int startDAPHNE(int argc, const char** argv, DaphneLibResult* daphneLibRes, int
user_config.use_ipa_const_propa = !noIPAConstPropa;
user_config.use_phy_op_selection = !noPhyOpSelection;
user_config.use_mlir_codegen = mlirCodegen;
user_config.hybrid = performHybridCodegen;
user_config.use_mlir_hybrid_codegen = performHybridCodegen;

if(!libDir.getValue().empty())
user_config.libdir = libDir.getValue();
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/execution/DaphneIrExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ bool DaphneIrExecutor::runPasses(mlir::ModuleOp module) {
if (userConfig_.use_distributed)
pm.addPass(mlir::daphne::createDistributePipelinesPass());

if (userConfig_.use_mlir_codegen) buildCodegenPipeline(pm);
if (userConfig_.use_mlir_codegen || userConfig_.use_mlir_hybrid_codegen) buildCodegenPipeline(pm);

if (userConfig_.enable_profiling)
pm.addNestedPass<mlir::func::FuncOp>(
Expand Down Expand Up @@ -299,7 +299,7 @@ void DaphneIrExecutor::buildCodegenPipeline(mlir::PassManager &pm) {

pm.addPass(mlir::daphne::createDaphneOptPass());

if (!userConfig_.hybrid) {
if (!userConfig_.use_mlir_hybrid_codegen) {
pm.addPass(mlir::daphne::createMatMulOpLoweringPass());
}

Expand Down
2 changes: 1 addition & 1 deletion test/codegen/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Output/
Output/**
.lit_test_times.txt

0 comments on commit 8f8b8dc

Please sign in to comment.