Skip to content

Commit

Permalink
Bump hashbrown from 0.14.5 to 0.15.0 (#2393)
Browse files Browse the repository at this point in the history
* Bump hashbrown from 0.14.5 to 0.15.0

Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.14.5 to 0.15.0.
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](rust-lang/hashbrown@v0.14.5...v0.15.0)

---
updated-dependencies:
- dependency-name: hashbrown
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix DefaultHashBuilder

* Fix round docstring

* Fix hashbrown hasher issues

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Guillaume Lagrange <lagrange.guillaume.1@gmail.com>
  • Loading branch information
dependabot[bot] and laggui authored Oct 21, 2024
1 parent 1df0704 commit 80c831b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
24 changes: 13 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ float-cmp = "0.9.0"
getrandom = { version = "0.2.15", default-features = false }
gix-tempfile = { version = "14.0.2", features = ["signals"] }
globwalk = "0.9.1"
hashbrown = "0.14.5"
hashbrown = "0.15.0"
hound = "3.5.1"
image = "0.25.2"
indicatif = "0.17.8"
Expand Down Expand Up @@ -149,6 +149,7 @@ sysinfo = "0.30.13"
systemstat = "0.2.3"
tch = "0.15.0"

ahash = { version = "0.8.11", default-features = false }
portable-atomic-util = { version = "0.2.2", features = ["alloc"] }

### For the main burn branch. ###
Expand Down
1 change: 1 addition & 0 deletions crates/burn-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ rmp-serde = { workspace = true, optional = true }
serde_json = { workspace = true, features = ["alloc"] } #Default enables std
spin = { workspace = true } # Using in place of use std::sync::Mutex when std is disabled
thiserror = { workspace = true, optional = true }
ahash = { workspace = true }

[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies]
portable-atomic-util = { workspace = true }
Expand Down
6 changes: 5 additions & 1 deletion crates/burn-core/src/module/param/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ use core::hash::{BuildHasher, Hasher};
use alloc::string::String;
use burn_common::id::IdGenerator;
use data_encoding::BASE32_DNSSEC;
use hashbrown::hash_map::DefaultHashBuilder;

// Hashbrown changed its default hasher in 0.15, but there are some issues
// https://github.com/rust-lang/hashbrown/issues/577
// Also, `param_serde_deserialize_legacy_uuid` doesn't pass with the default hasher.
type DefaultHashBuilder = core::hash::BuildHasherDefault<ahash::AHasher>;

/// Parameter ID.
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion crates/burn-tensor/src/tensor/api/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ where
/// Applies element wise round operation.
///
/// This function implements the [round half to even](https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even)
/// strategy, with halfway cases rounded to the nearest integer value.
/// strategy, with halfway cases rounded to the nearest even integer value.
pub fn round(self) -> Self {
Self::new(TensorPrimitive::Float(B::float_round(
self.primitive.tensor(),
Expand Down
4 changes: 2 additions & 2 deletions crates/burn-tensor/src/tensor/ops/tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,8 @@ pub trait FloatTensorOps<B: Backend> {

/// Returns a new tensor with rounded values.
///
/// This function should implemented the [round half to even](https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even)
/// strategy, with halfway cases rounded to the nearest integer value.
/// This function should implement the [round half to even](https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even)
/// strategy, with halfway cases rounded to the nearest even integer value.
///
/// # Arguments
///
Expand Down

0 comments on commit 80c831b

Please sign in to comment.