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

BUG: upgrade from 2.3.1 to 2.4.0 breaks no_std build #107

Closed
antimora opened this issue Feb 26, 2024 · 3 comments
Closed

BUG: upgrade from 2.3.1 to 2.4.0 breaks no_std build #107

antimora opened this issue Feb 26, 2024 · 3 comments

Comments

@antimora
Copy link

antimora commented Feb 26, 2024

We use half lib extensively in our Burn project and we have a git action to build for no_std which is failing when upgrading from 2.3.1 to 2.4.0.

I recommend CI step is added specifically to test std feature off (no_std testing) because a similar problem occurred in the past (see #84).

See errors:

Compiling bincode v2.0.0-rc.3
  error: cannot find macro `vec` in this scope
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/half-2.4.0/src/slice.rs:368:23
      |
  368 |         let mut vec = vec![0f32; self.len()];
      |                       ^^^
      |
  help: consider importing this macro
      |
  10  + use alloc::vec;
      |
  
  error: cannot find macro `vec` in this scope
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/half-2.4.0/src/slice.rs:377:23
      |
  377 |         let mut vec = vec![0f64; self.len()];
      |                       ^^^
      |
  help: consider importing this macro
      |
  10  + use alloc::vec;
      |
  
  error: cannot find macro `vec` in this scope
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/half-2.4.0/src/slice.rs:462:23
      |
  462 |         let mut vec = vec![0f32; self.len()];
      |                       ^^^
      |
  help: consider importing this macro
      |
  10  + use alloc::vec;
      |
  
  error: cannot find macro `vec` in this scope
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/half-2.4.0/src/slice.rs:471:23
      |
  471 |         let mut vec = vec![0f64; self.len()];
      |                       ^^^
      |
  help: consider importing this macro
      |
  10  + use alloc::vec;
      |
  
  error: cannot find macro `vec` in this scope
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/half-2.4.0/src/vec.rs:139:23
      |
  139 |         let mut vec = vec![f16::from_bits(0); slice.len()];
      |                       ^^^
      |
  help: consider importing this macro
      |
  12  + use alloc::vec;
      |
  
  error: cannot find macro `vec` in this scope
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/half-2.4.0/src/vec.rs:146:23
      |
  146 |         let mut vec = vec![f16::from_bits(0); slice.len()];
      |                       ^^^
      |
  help: consider importing this macro
      |
  12  + use alloc::vec;
      |
  
  error: cannot find macro `vec` in this scope
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/half-2.4.0/src/vec.rs:[175](https://github.com/tracel-ai/burn/actions/runs/8042757366/job/21963835704?pr=1364#step:11:178):23
      |
  175 |         let mut vec = vec![bf16::from_bits(0); slice.len()];
      |                       ^^^
      |
  help: consider importing this macro
      |
  12  + use alloc::vec;
      |
  
  error: cannot find macro `vec` in this scope
     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/half-2.4.0/src/vec.rs:[182](https://github.com/tracel-ai/burn/actions/runs/8042757366/job/21963835704?pr=1364#step:11:185):23
      |
  182 |         let mut vec = vec![bf16::from_bits(0); slice.len()];
      |                       ^^^
      |
  help: consider importing this macro
      |
  12  + use alloc::vec;
      |
@antimora antimora changed the title upgrade from 2.3.1 to 2.4.0 breaks no-std build BUG: upgrade from 2.3.1 to 2.4.0 breaks no_std build Feb 26, 2024
@antimora
Copy link
Author

Hi @starkat99, did you get a chance to see this bug?

@starkat99
Copy link
Owner

Apologies for delay, March has been a lot. no_std is being tested in CI, but this appears to be no_std + alloc feature, which looks like is being missed in CI. Putting in a fix and CI test

@starkat99
Copy link
Owner

Released 2.4.1 with fix for this @antimora

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

No branches or pull requests

2 participants