drhagen / tensora

Sparse/dense tensor library for Python
http://tensora.drhagen.com/
MIT License
9 stars 2 forks source link

Provide the LLVM as a compiler backend #73

Closed drhagen closed 2 months ago

drhagen commented 2 months ago

This uses llvmlite to build LLVM code from the Tensora IR. Use of the LLVM backend is controlled with the tensora.compile.BackendCompiler.{llvm,cffi} flag to TensorMethod. This is also exposed as the -l llvm option to the CLI, which prints out LLVM IR.

llvmlite has a ctypes interface, but this PR still uses cffi for the taco tensor structures and invoking the compiled function.

Implements #66.

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 83.64389% with 79 lines in your changes missing coverage. Please review.

Project coverage is 90.53%. Comparing base (bc2013a) to head (720de80).

Files Patch % Lines
src/tensora/codegen/_ir_to_llvm.py 80.45% 45 Missing and 6 partials :warning:
src/tensora/compile/_porcelain.py 78.72% 8 Missing and 2 partials :warning:
src/tensora/compile/_tensor_method.py 82.92% 2 Missing and 5 partials :warning:
src/tensora/generate/_base.py 78.57% 3 Missing and 3 partials :warning:
src/tensora/codegen/_type_to_llvm.py 91.17% 3 Missing :warning:
src/tensora/ir/ast.py 71.42% 1 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #73 +/- ## ========================================== - Coverage 92.72% 90.53% -2.19% ========================================== Files 53 60 +7 Lines 2761 3150 +389 Branches 498 540 +42 ========================================== + Hits 2560 2852 +292 - Misses 125 206 +81 - Partials 76 92 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.