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

Support for scalar optimization #1442

Merged
merged 1 commit into from Mar 12, 2024

Conversation

carrotflakes
Copy link
Contributor

@carrotflakes carrotflakes commented Mar 9, 2024

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

Provide links to relevant issues and dependent PRs.

Changes

I encountered an error when attempting to optimize scalars (Param<Tensor<B, 0>>). The issue stemmed from the absence of AdaptorRecordV1::Rank0 . This was likely an oversight, so I added Rank0 support.

Testing

I confirmed that it is possible to train my model that include Param<Tensor<B, 0>>.

@carrotflakes
Copy link
Contributor Author

The test is failing, but I don't think the change is the cause.
Is there anything I can do to fix the test?
Also, is there something missing in this pull request?

@antimora
Copy link
Collaborator

CI is failing due to this error in WGPU backend, which could be a fluke. I will re-run the CI again. Meanwhile I am tagging @nathanielsimard and @louisfd:

 test tests::jit_fusion::var::tests::test_var_mean_bias ... ok
  
  failures:
  
  ---- tests::jit::kernel::reduction::reduction::reduction_sum_dim_should_work_with_multiple_invocations stdout ----
  thread 'tests::jit::kernel::reduction::reduction::reduction_sum_dim_should_work_with_multiple_invocations' panicked at crates/burn-wgpu/src/lib.rs:73:5:
  Tensors are not approx eq:
    => Position 1: 507.8968200683594 != 507.8955383300781 | difference 0.00128173828125 > tolerance 0.0010000000000000002
  
  
  failures:
      tests::jit::kernel::reduction::reduction::reduction_sum_dim_should_work_with_multiple_invocations
  
  test result: FAILED. 1341 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 50.05s
  
  error: test failed, to rerun pass `-p burn-wgpu --lib`
  Error: Process completed with exit code 101.

@louisfd
Copy link
Member

louisfd commented Mar 12, 2024

This test's tolerance was changed from 10e-3 to 10e-2 since the creation of this PR. By merging main into your branch you should be fine.

@carrotflakes
Copy link
Contributor Author

Thank you! merged.

@nathanielsimard nathanielsimard merged commit 80aac1d into tracel-ai:main Mar 12, 2024
12 checks passed
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.

None yet

4 participants