-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathconfig.rs
More file actions
42 lines (38 loc) · 1.01 KB
/
config.rs
File metadata and controls
42 lines (38 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use cubecl_core::{
CubeCount, CubeDim, Runtime,
client::ComputeClient,
prelude::{CubePrimitive, TensorHandleRef},
};
#[derive(Debug, Clone)]
pub struct ScanConfig {
pub cube_count: CubeCount,
pub cube_dim: CubeDim,
pub clear_cube_dim: CubeDim,
pub line_size: u32,
pub clear_line_size: u32,
pub inclusive: bool,
}
impl ScanConfig {
pub(crate) fn generate<R: Runtime, N: CubePrimitive>(
client: &ComputeClient<R::Server, R::Channel>,
input: &TensorHandleRef<R>,
output: &TensorHandleRef<R>,
) -> ScanConfig {
// ToDo
ScanConfig::empty()
}
fn empty() -> Self {
Self {
cube_count: CubeCount::new_single(),
cube_dim: CubeDim::new_single(),
clear_cube_dim: CubeDim::new_single(),
line_size: 1,
clear_line_size: 1,
inclusive: false,
}
}
pub fn with_inclusive(mut self, inclusive: bool) -> Self {
self.inclusive = inclusive;
self
}
}