Closed jackalcooper closed 1 month ago
[!WARNING]
Rate limit exceeded
@jackalcooper has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 8 seconds before requesting another review.
⌛ How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.🚦 How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.📥 Commits
Files that changed from the base of the PR and between c8523917a11474566693bed03f2059e83cd9ac69 and 46945dd44e7e5ac56a19bbf6f2cf748a909fd4d4.
The changes in this pull request primarily enhance the documentation and functionality of the Beaver project, which serves as a front end for MLIR using Elixir. Key updates include an expanded README with new examples, a clearer project motivation, and enhanced installation instructions. Additionally, several modules have been modified, including the introduction of new functions and the renaming of parameters for consistency. Notably, the Beaver.Diagnostic
module has been removed, replaced by a new Beaver.DiagnosticHandlerRunner
, which manages diagnostics more effectively.
File Path | Change Summary |
---|---|
README.md |
Added content and examples related to Beaver, expanded motivation section, new code examples for defining functions and passes, clarified project goals, detailed installation guide, and development instructions. |
lib/beaver.ex |
Updated mlir macro to enhance context retrieval, added with_diagnostics function for running functions with a diagnostic handler, and updated documentation accordingly. |
lib/beaver/deferred.ex |
Added module documentation, updated from_opts/2 to use fetch_context/1 , introduced fetch_context/1 and fetch_block/1 functions for better context and block retrieval. |
lib/beaver/diagnostic.ex |
Module removed, eliminating all associated diagnostic handling functionality. |
lib/beaver/diagnostic/server.ex |
Module removed, which handled diagnostic messages using a GenServer. |
lib/beaver/dsl/pattern.ex |
Updated Env struct field from block to blk , modified references in function signatures and macro implementations. |
lib/beaver/dsl/ssa.ex |
Renamed block field to blk in type definition and struct declaration, updated put_block function. |
lib/beaver/enif.ex |
Renamed block parameter to blk in declare_external_functions/2 and call/2 , added default value for opts in invoke/4 . |
lib/beaver/mlir.ex |
Added new functions for context and location retrieval, modified existing functions to streamline entity handling, and added new types for Identifier and Diagnostic . |
lib/beaver/mlir/attribute.ex |
Removed equal? function, updated float function to change context retrieval method. |
lib/beaver/mlir/block.ex |
Updated add_args!/3 function to use MLIR.context/1 for context retrieval. |
lib/beaver/mlir/capi.ex |
Added documentation for potential Elixir code execution from MLIR C APIs, renamed and added several functions for clarity and consistency. |
lib/beaver/mlir/capi_codegen.ex |
Updated kinds/0 function to include a new KindDecl for Beaver.StringPrinter . |
lib/beaver/mlir/capi_kinds.ex |
Removed Diagnostic entry from mlir_mods list. |
lib/beaver/mlir/diagnostic.ex |
Introduced new Beaver.MLIR.Diagnostic module with functions for severity and detaching diagnostic handlers. |
lib/beaver/mlir/dialect/cf.ex |
Renamed block parameter to blk in cond_br function. |
lib/beaver/mlir/external_pass.ex |
Updated do_create function to use Beaver.PassRunner instead of MLIR.Pass.Server . |
lib/beaver/mlir/identifier.ex |
Added new get/2 function for retrieving MLIR identifiers. |
lib/beaver/mlir/operation.ex |
Renamed block parameter to blk , removed equal? function, updated context retrieval method in get_and_update . |
lib/beaver/mlir/pass/composer.ex |
Enhanced error handling in add_pipeline and updated context retrieval method in to_pm . |
lib/beaver/mlir/pass/server.ex |
Module removed, which handled MLIR passes using a GenServer. |
lib/beaver/mlir/pattern.ex |
Updated context retrieval in apply_ function. |
lib/beaver/mlir/sigils.ex |
Updated documentation examples to use MLIR.equal?/2 for equality checks. |
lib/beaver/mlir/type.ex |
Removed multiple clauses from equal?/2 function. |
lib/beaver/pass_runner.ex |
Introduced new Beaver.PassRunner GenServer module for executing MLIR passes. |
lib/beaver/slang.ex |
Renamed block option to blk in various function calls and macro definitions. |
lib/beaver/string_printer.ex |
Introduced new Beaver.StringPrinter module for interacting with MLIR CAPI using a string callback. |
native/gen_wrapper.exs |
Expanded @io_only module attribute to include additional entries for Zig code generation. |
native/include/mlir-c/Beaver/Op.h |
Added new function declaration for mlirIdentifierPrint . |
native/lib/CAPI/Beaver.cpp |
Added new function mlirIdentifierPrint for printing MLIR identifiers. |
native/src/diagnostic.zig |
Introduced new error handling and diagnostic sending functionality, modified existing methods for clarity. |
native/src/logical_mutex.zig |
Introduced Token struct for thread synchronization and signaling functions. |
native/src/main.zig |
Updated NIF loading to include new logical mutex resource. |
native/src/mlir_capi.zig |
Updated allKinds to include string_ref.Printer.ResourceKind . |
native/src/pass.zig |
Modified Token structure handling and updated BeaverPass functions for error handling and resource management. |
native/src/string_ref.zig |
Renamed Printer function to PrinterNIF , added new Printer struct for managing multiple string references. |
test/arith_test.exs |
Updated test context access to use pattern matching. |
test/block_test.exs |
Updated test context access and assertions for diagnostic information. |
test/bytecode_test.exs |
Updated context access and retrieval method for MLIR module creation. |
test/capi_test.exs |
Standardized context retrieval for locations and updated test signatures. |
test/cf_test.exs |
Updated test context access for clarity and correctness. |
test/cuda_runtime_test.exs |
Updated test context access using pattern matching. |
test/debug_output_test.exs |
Updated test context access for clarity and conciseness. |
test/diagnostic_test.exs |
Introduced new DiagnosticTest module for testing Beaver.DiagnosticHandler . |
test/e2e_test.exs |
Updated test context access for JIT-compiled function invocation. |
test/elixir_ast_dialect_test.exs |
Updated test context access for clarity. |
test/enif_test.exs |
Updated test context access for multiple tests. |
test/entity_test.exs |
Enhanced testing for MLIR entities, standardized equality checks, and improved context handling. |
test/env_test.exs |
Updated test context access for clarity. |
test/exterior_test.exs |
Updated test context access for clarity. |
test/gen_ir_test.exs |
Updated test context access for clarity. |
test/gpu_test.exs |
Updated test context access for clarity. |
test/irdl_test.exs |
Updated test context access for clarity. |
test/load_ir_test.exs |
Updated test context access for clarity. |
test/memref_test.exs |
Updated test context access for clarity. |
test/op_test.exs |
Updated test context access for clarity. |
test/pass_test.exs |
Enhanced diagnostic capabilities in tests, simplified context usage, and added new test case for error handling. |
test/pdl_test.exs |
Updated test context access for clarity. |
test/redundant_transpose_test.exs |
Updated test context access and modified attribute comparison logic. |
test/region_test.exs |
Updated test context access for clarity. |
test/string_ref_test.exs |
Changed testing framework to Beaver.Case and added new tests for Beaver.StringPrinter . |
test/support/beaver_case.ex |
Updated setup for diagnostic server to use Beaver.DiagnosticHandlerRunner . |
test/support/dummy.ex |
Updated parameter name from block to blk in put_func . |
test/support/elixir_ast_dialect.ex |
Updated parameter names in gen_mlir function. |
test/support/toy_pass.ex |
Added error handling in run/1 function. |
test/support/translate.ex |
Updated mlir macro calls to use blk instead of block . |
test/tosa_test.exs |
Updated test context access for clarity. |
test/type_infer_test.exs |
Updated test context access and modified type assertion mechanism. |
test/walker_test.exs |
Updated test context access for clarity. |
lib/beaver/diagnostic_handler_runner.ex |
Introduced new Beaver.DiagnosticHandlerRunner module for managing diagnostic handlers. |
lib/beaver/mlir/affine_map.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/mlir/dialect.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/mlir/location.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/mlir/logical_result.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/mlir/op_operand.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/mlir/pass_manager.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/mlir/region.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/mlir/string_ref.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/mlir/value.ex |
Updated formatting of use Kinda.ResourceKind directive. |
lib/beaver/native/opaque_ptr.ex |
Updated formatting of use Kinda.ResourceKind directive. |
mix.exs |
Updated docs() function to modify Utils group and adjusted make_precompiler_nif_versions function for target string handling. |
sequenceDiagram
participant User
participant Beaver
participant MLIR
User->>Beaver: Define function
Beaver->>MLIR: Create MLIR operation
MLIR-->>Beaver: Operation created
Beaver->>User: Return operation result
lib/beaver/dsl/pattern.ex
file related to the mlir
macro and pattern handling.insert
function and defpat
macro in the Beaver.Pattern
module.🐰 In the land of code where beavers play,
New functions and docs brighten the day.
Withblk
andctx
, we hop with glee,
Crafting MLIR, as happy as can be!
So let’s celebrate with a joyful cheer,
For Beaver’s journey, we hold so dear! 🎉
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Beaver.DiagnosticHandlerRunner
for managing diagnostic error handling.Bug Fixes
Documentation
README.md
with expanded motivation, usage examples, and installation instructions.Refactor
block
toblk
).use Kinda.ResourceKind
directives for better readability.Tests
Beaver.DiagnosticHandlerRunner
and other functionalities.Chores