Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide the LLVM as a compiler backend #73

Merged
merged 2 commits into from
Aug 27, 2024
Merged

Provide the LLVM as a compiler backend #73

merged 2 commits into from
Aug 27, 2024

Conversation

drhagen
Copy link
Owner

@drhagen drhagen commented Aug 26, 2024

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
Copy link

⚠️ 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 ⚠️
src/tensora/compile/_porcelain.py 78.72% 8 Missing and 2 partials ⚠️
src/tensora/compile/_tensor_method.py 82.92% 2 Missing and 5 partials ⚠️
src/tensora/generate/_base.py 78.57% 3 Missing and 3 partials ⚠️
src/tensora/codegen/_type_to_llvm.py 91.17% 3 Missing ⚠️
src/tensora/ir/ast.py 71.42% 1 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drhagen drhagen merged commit e05eb8d into master Aug 27, 2024
9 checks passed
@drhagen drhagen deleted the llvm branch August 27, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants