daphne-project / daphne-project/daphne

Codegen-only compilation pipeline for LA operations

Open
#693 0 comments 0 reactions 0 assignees View on GitHub
LDE summer 2024 LDE winter 2024/25 student project
Dominant language
C++
Stars
81
Forks
83
PR merge metrics
No merged PRs in 30d

Description

**Motivation**: By default, DAPHNE lowers domain-specific operations from linear and relational algebra to calls to pre-
compiled C++ kernels (physical operators). However, being based on MLIR/LLVM, on-the-fly code generation for these operations is an alternative option.

**Task**: Implement a proof-of-concept for a compilation pipeline in DAPHNE, which only involves code-generated
operations. For simplicity, you can focus on linear algebra operations, whereby dense and sparse matrices should be
supported. The resulting code may only target CPUs or, optionally, also lower to GPUs.

To start, take DaphneDSL of an example (e.g., from `scripts/`) and save the generated DaphneIR, or write an example DaphneIR file by hand. Use the `daphne-opt` tool to quickly iterate on your lowering passes and the whole lowering pipeline. Once this works for a set of scripts, bring the alternative compilation pipeline to the DAPHNE compiler through an optional command-line argument.

Note: Working on the GPU part of this task is optional and requires a GPU.

Contributor guide

Open the contributing guide

Research direction

Start with a DaphneDSL example from scripts/ or write a DaphneIR file by hand, then use daphne-opt to iterate on lowering passes and the full pipeline. Verify a set of linear algebra scripts for dense and sparse matrices, and then trace the DAPHNE compiler entry point to add an optional command-line selection for the code-generation-only pipeline. GPU lowering is optional.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.