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

Disable const-random ahash feature on non-WASM (#3271) #3277

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Dec 5, 2022

Which issue does this PR close?

Closes #3271

Rationale for this change

Copy configuration from arrow crate to only enable compile-time-rng where necessary.

Added in #2896

What changes are included in this PR?

Are there any user-facing changes?

@tustvold tustvold requested a review from viirya December 5, 2022 22:18
@github-actions github-actions bot added the parquet Changes to the parquet crate label Dec 5, 2022
@tustvold tustvold merged commit 7b38cb8 into apache:master Dec 5, 2022
@ursabot
Copy link

ursabot commented Dec 5, 2022

Benchmark runs are scheduled for baseline = 94d597e and contender = 7b38cb8. 7b38cb8 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@Fuuzetsu
Copy link

Fuuzetsu commented Dec 6, 2022

@viirya @tustvold Did you check that this actually does anything? The way that cargo resolution works, this change has no impact:

rust-lang/cargo#1197

tkaitchuck/aHash#140

Even if you put a feature behind a target that we're not compiling for, it will get included. Therefore as long as ahash is in the tree and compile-time-rng is specified for any of the targets, it const-random will be pulled in.

@tustvold
Copy link
Contributor Author

tustvold commented Dec 6, 2022

$ cargo check --no-default-features --target wasm32-unknown-unknown
   Compiling autocfg v1.1.0
   Compiling crunchy v0.2.2
   Compiling libc v0.2.138
   Compiling tiny-keccak v2.0.2
   Compiling proc-macro-hack v0.5.19
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling once_cell v1.16.0
    Checking byteorder v1.4.3
    Checking static_assertions v1.1.0
    Checking integer-encoding v3.0.4
    Checking hashbrown v0.13.1
   Compiling paste v1.0.9
    Checking bytes v1.3.0
   Compiling seq-macro v0.3.1
    Checking twox-hash v1.6.3
   Compiling ahash v0.8.2
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling num-rational v0.4.1
   Compiling num-iter v0.1.43
   Compiling num-bigint v0.4.3
   Compiling getrandom v0.2.8
   Compiling const-random-macro v0.1.15
    Checking const-random v0.1.15
    Checking num-complex v0.4.2
    Checking ordered-float v2.10.0
    Checking thrift v0.17.0
    Checking chrono v0.4.23
    Checking num v0.4.0
    Checking parquet v28.0.0 (/home/raphael/repos/external/arrow-rs/parquet)
    Finished dev [unoptimized + debuginfo] target(s) in 3.34s
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
    Checking cfg-if v1.0.0
    Checking once_cell v1.16.0
    Checking static_assertions v1.1.0
    Checking byteorder v1.4.3
    Checking integer-encoding v3.0.4
    Checking bytes v1.3.0
    Checking hashbrown v0.13.1
   Compiling num-iter v0.1.43
   Compiling num-rational v0.4.1
   Compiling ahash v0.8.2
   Compiling num-bigint v0.4.3
    Checking libc v0.2.138
    Checking twox-hash v1.6.3
    Checking getrandom v0.2.8
    Checking num-complex v0.4.2
    Checking ordered-float v2.10.0
    Checking thrift v0.17.0
    Checking chrono v0.4.23
    Checking num v0.4.0
    Checking parquet v28.0.0 (/home/raphael/repos/external/arrow-rs/parquet)
    Finished dev [unoptimized + debuginfo] target(s) in 2.71s

So on wasm it is pulling in const-random and on non wasm32 platform it is not. So it does appear to be working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

using ahash compile-time-rng kills reproducible builds
4 participants