beaver-lodge / beaver

MLIR Toolkit in Elixir and Zig.
MIT License
164 stars 8 forks source link

Overhaul of namespaces #369

Closed jackalcooper closed 4 weeks ago

jackalcooper commented 1 month ago

Summary by CodeRabbit

coderabbitai[bot] commented 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 15 minutes and 27 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 Reviewing files that changed from the base of the PR and between d58f7b7d12354128c48ac3a61c9f5ebe3062a10d and 2eb341e8e5fe42f86fed14818fa65aedcdcc9bce.

Walkthrough

The pull request introduces significant documentation changes and structural updates across various modules in the Beaver project. A new CONTRIBUTING.md file has been added to guide contributions, detailing the project’s architecture and development setup. The README.md has been refined to reflect current API usage, particularly in the context of MLIR operations. Various modules have been updated to replace old function calls with new ones, particularly shifting from MLIR.Pass.Composer to Beaver.Composer. Additionally, several modules have been renamed or restructured for clarity and consistency, while tests have been updated accordingly.

Changes

File/Path Change Summary
CONTRIBUTING.md New document added outlining contribution guidelines and project structure.
README.md Updated code examples, removed outdated sections, and improved clarity on usage.
bench/enif_add.ex Updated nullity checks for consistency in naming conventions.
bench/enif_support.ex Refactored to use Beaver.Composer for MLIR operations.
guides/your-first-beaver-compiler.livemd Updated to reflect changes in pass composition and execution.
lib/beaver.ex Expanded documentation, updated macros for error handling, and introduced new block-related macros.
lib/beaver/capturer.ex Module renamed from Beaver.DiagnosticsCapturer to Beaver.Capturer.
lib/beaver/changeset.ex Module renamed from Beaver.MLIR.Operation.Changeset to Beaver.Changeset.
lib/beaver/composer.ex Module renamed from Beaver.MLIR.Pass.Composer to Beaver.Composer.
lib/beaver/deferred.ex Simplified context and block fetching logic.
lib/beaver/env.ex Updated error handling and added a new helper function for error messages.
lib/beaver/exterior.ex Removed register_all/1 function, altering dialect registration.
lib/beaver/exterior/elixir.ex New module added for Elixir dialect representation in MLIR.
lib/beaver/generator.ex Renamed module and updated function calls for string conversion.
lib/beaver/mlir.ex Added new verification functions and improved documentation.
lib/beaver/mlir/attribute.ex Removed NamedAttribute module and updated attribute handling logic.
lib/beaver/mlir/block.ex Added destroy/1 function for block resource management.
lib/beaver/mlir/capi.ex Simplified dynamic library loading and error handling for NIF functions.
lib/beaver/mlir/context.ex Introduced with_registry/2 for managing dialect registries.
lib/beaver/mlir/conversion.ex Updated module dependency to reflect new composer usage.
lib/beaver/mlir/diagnostic.ex Added module documentation for clarity.
lib/beaver/mlir/dialect/arith.ex Enhanced handling of comparison operators with new utility functions.
lib/beaver/mlir/dialect/func.ex Renamed is_external/1 to external?/1 for clarity.
lib/beaver/mlir/execution_engine.ex Updated aliasing and simplified null-checking logic.
lib/beaver/mlir/external_pass.ex Removed root_module from resource kind definition.
lib/beaver/mlir/location.ex Updated documentation examples for context destruction.
lib/beaver/mlir/module.ex Refactored to streamline creation and verification of MLIR modules.
lib/beaver/mlir/named_attribute.ex New module added for named attributes.
lib/beaver/mlir/operation.ex Removed verification functions and updated internal references.
lib/beaver/mlir/pass_manager.ex Added module documentation for clarity.
lib/beaver/mlir/pattern.ex Removed pattern module, encapsulating its logic elsewhere.
lib/beaver/mlir/string_ref.ex Updated string reference handling and removed direct conversion methods.
lib/beaver/mlir/transform.ex New module introduced for default MLIR transformations.
lib/beaver/mlir/transforms.ex Module removed, functionality absorbed elsewhere.
lib/beaver/mlir/type.ex Refactored function calls and enhanced documentation on type categories.
lib/beaver/mlir/value.ex Updated module documentation for clarity.
lib/beaver/pass_runner.ex Removed unused logging functionality.
lib/beaver/pattern.ex Updated pattern insertion logic for verification.
lib/beaver/printer.ex Module renamed from Beaver.StringPrinter to Beaver.Printer.
lib/beaver/sigils.ex Renamed from Beaver.MLIR.Sigils to Beaver.Sigils.
lib/beaver/slang.ex Enhanced documentation and refined implementation of macros.
lib/beaver/walker.ex Updated null-checking references for consistency.
mix.exs Updated documentation files and added new dependency for credo.
native/src/string_ref.zig Updated NIF entry names for consistency and flexibility.
profile/cuda_runtime_overhead.exs Updated MLIR pass composer references to Beaver.Composer.
test/... Numerous test files updated to reflect changes in function calls, imports, and verification methods.

Possibly related PRs

🐇 In the land of code, where beavers play,
New guides and docs brighten the way.
With functions renamed and patterns refined,
The Beaver project grows, beautifully aligned.
So hop along, dear coder, with glee,
For the changes made are a sight to see! 🐾


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?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.