good first issue
Repository metrics
- Stars
- (80 個のスター)
- PR merge metrics
- (PR metrics pending)
説明
Motivation: The number of distinct values in a matrix is an interesting data characteristic that can be used in multiple ways. As calculating the exact number of distinct values can be quite costly, DAPHNE implements a numDistinctApprox-kernel that uses the k-minimum values approach to approximate the number of distinct values. So far, this kernel has not been connected to DaphneDSL yet. Hence, DAPHNE users cannot use it.
Task: Connect the numDistinctApprox-kernel to DaphneDSL. To this end you should:
- Have a look at the kernel in
src/runtime/local/kernels/numDistinctApprox.h. - Make sure that it gets instantiated/precompiled for a couple of relevant combinations of data types (e.g.,
DenseMatrixandCSRMatrix) and value types (e.g.,doubleandint64_t) insrc/runtime/local/kernels.json. - Add a DaphneIR operation
NumDistinctApproxOpinsrc/ir/daphneir/DaphneOps.td. See also the MLIR documentation. - Add a DaphneDSL built-in function
numDistinctApproxthat generates aNumDistinctApproxOpin the IR insrc/parser/daphnedsl/DaphneDSLBuiltins.cpp. - Add script-level test cases for the new DaphneDSL built-in function in
test/api/cli/operations/. See the guidelines on testing in DAPHNE. Unit tests for the kernel do already exist intest/runtime/local/NumDistinctApproxTest.cpp.