yongster commented on code in PR #11244:
URL: https://github.com/apache/arrow-rs/pull/11244#discussion_r4188125931
##########
arrow/benches/cast_kernels.rs:
##########
@@ -257,6 +258,31 @@ fn cast_array(array: &ArrayRef, to_type: DataType) {
hint::black_box(cast(hint::black_box(array),
hint::black_box(&to_type)).unwrap());
}
+fn build_half_embedding(
Review Comment:
Dropped `build_half_embedding`. These are plain Float16 and Float32 arrays;
1024×768 is only the length.
##########
arrow/benches/cast_kernels.rs:
##########
@@ -257,6 +258,31 @@ fn cast_array(array: &ArrayRef, to_type: DataType) {
hint::black_box(cast(hint::black_box(array),
hint::black_box(&to_type)).unwrap());
}
+fn build_half_embedding(
+ rows: usize,
+ dims: usize,
+ null_every: Option<usize>,
+) -> (ArrayRef, ArrayRef) {
+ let len = rows * dims;
+ let f32_values = (0..len)
+ .map(|index| ((index.wrapping_mul(2_654_435_761) % 20_001) as f32 -
10_000.0) / 127.0)
Review Comment:
Removed the custom generator and `null_every`. The cases now use
`create_nullable_f16_array` and `create_primitive_array`, which go through
`seedable_rng` and take a `null_density` (`0.0` and `0.1`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]