Skip to content

test: Metal test now works#1581

Merged
avik-pal merged 1 commit intomainfrom
ap/fix_ci_again
Dec 5, 2025
Merged

test: Metal test now works#1581
avik-pal merged 1 commit intomainfrom
ap/fix_ci_again

Conversation

@avik-pal
Copy link
Member

@avik-pal avik-pal commented Dec 5, 2025

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @avik-pal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on improving the reliability and consistency of tests related to the Metal backend. It updates the test suite to correctly reflect the passing status of a key weight initializer test on Metal and pins the Metal package dependency to a specific version to prevent potential compatibility issues in the future.

Highlights

  • Metal Test Fix: The kaiming_normal weight initializer test is no longer marked as broken for the Metal backend, indicating that it now passes successfully.
  • Metal Package Version Pin: The test configuration for the Metal backend now explicitly specifies version 1.9 for the Metal package, ensuring consistent test environments.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes a failing test for the Metal backend by pinning the Metal.jl package to version 1.9. The change to enable the test is correct. However, I've suggested a small improvement to the version pinning in runtests.jl to make it more flexible for future updates, which will improve maintainability.

push!(EXTRA_PKGS, PackageSpec(; name="AMDGPU"))
(BACKEND_GROUP == "all" || BACKEND_GROUP == "metal") &&
push!(EXTRA_PKGS, PackageSpec("Metal"))
push!(EXTRA_PKGS, PackageSpec(; name="Metal", version="1.9"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Pinning the Metal package to the exact version 1.9 might be too restrictive and could prevent your test environment from receiving important non-breaking bug fixes or performance improvements in future patch releases. It's generally better to allow for compatible updates.

Consider using a caret ^ for the version specifier, like version="^1.9". This will allow any version from 1.9.0 up to (but not including) 2.0.0, following semantic versioning. This makes your test setup more robust and less likely to require manual updates for minor package releases.

    push!(EXTRA_PKGS, PackageSpec(; name="Metal", version="^1.9"))

@avik-pal avik-pal merged commit 1f1fbb6 into main Dec 5, 2025
38 of 53 checks passed
@avik-pal avik-pal deleted the ap/fix_ci_again branch December 5, 2025 19:52
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Benchmark Results (Julia v1.11)

Time benchmarks
main 4e0166f... main / 4e0166f...
basics/MHA 4.09 ± 0.31 μs 4.12 ± 0.36 μs 0.993 ± 0.12
basics/MHA (first run) 4.34 ± 0.41 μs 4.46 ± 0.61 μs 0.973 ± 0.16
basics/MHA reactant 0.0609 ± 0.0055 ms 0.0661 ± 0.0071 ms 0.922 ± 0.13
basics/MHA reactant (comp + run) 0.14 ± 0.0038 s 0.147 ± 0.0039 s 0.952 ± 0.036
basics/conv 12.6 ± 16 μs 12.2 ± 16 μs 1.03 ± 1.9
basics/conv (first run) 10.4 ± 2.1 μs 10.7 ± 2.1 μs 0.976 ± 0.27
basics/conv reactant 0.0508 ± 0.0019 ms 0.0516 ± 0.0024 ms 0.983 ± 0.059
basics/conv reactant (comp + run) 0.0994 ± 0.0037 s 0.101 ± 0.0042 s 0.984 ± 0.055
basics/dense 0.181 ± 0.01 μs 0.181 ± 0.011 μs 1 ± 0.082
basics/dense (first run) 0.2 ± 0.01 μs 0.2 ± 0.01 μs 1 ± 0.071
basics/dense reactant 0.046 ± 0.0016 ms 0.0505 ± 0.0049 ms 0.91 ± 0.095
basics/dense reactant (comp + run) 0.0816 ± 0.002 s 0.0818 ± 0.0044 s 0.996 ± 0.059
time_to_load 0.886 ± 0.012 s 0.912 ± 0.035 s 0.972 ± 0.039
Memory benchmarks
main 4e0166f... main / 4e0166f...
basics/MHA 0.087 k allocs: 6.05 kB 0.087 k allocs: 6.05 kB 1
basics/MHA (first run) 0.087 k allocs: 6.05 kB 0.087 k allocs: 6.05 kB 1
basics/MHA reactant 19 allocs: 0.578 kB 19 allocs: 0.578 kB 1
basics/MHA reactant (comp + run) 18 k allocs: 1.37 MB 18 k allocs: 1.37 MB 1
basics/conv 0.038 k allocs: 5.12 kB 0.038 k allocs: 5.12 kB 1
basics/conv (first run) 0.038 k allocs: 5.12 kB 0.038 k allocs: 5.12 kB 1
basics/conv reactant 15 allocs: 0.438 kB 15 allocs: 0.438 kB 1
basics/conv reactant (comp + run) 6.14 k allocs: 0.813 MB 6.15 k allocs: 0.813 MB 1
basics/dense 2 allocs: 0.109 kB 2 allocs: 0.109 kB 1
basics/dense (first run) 2 allocs: 0.109 kB 2 allocs: 0.109 kB 1
basics/dense reactant 15 allocs: 0.422 kB 15 allocs: 0.422 kB 1
basics/dense reactant (comp + run) 5.91 k allocs: 0.796 MB 5.9 k allocs: 0.796 MB 1
time_to_load 0.159 k allocs: 11.2 kB 0.159 k allocs: 11.2 kB 1

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.

1 participant