Skip to content

Commit c1414e6

Browse files
committed
change memory model from gpu to npu
1 parent ff5270e commit c1414e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+744
-1083
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[package]
22
name = "descend"
33
version = "0.1.0"
4-
authors = ["Köpcke <[email protected]>"]
4+
authors = [
5+
"Luca Carlig <[email protected]>",
6+
"Köpcke <[email protected]>",
7+
]
58
edition = "2021"
69

710
# Allow specific lints globally

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 32 additions & 287 deletions
Large diffs are not rendered by default.

examples/core/assign.desc.off

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
fn assign<n: nat, r: prv>(
2-
a: &r shrd gpu.global [i16; 16],
3-
b: &r uniq gpu.global [i16; 16]
4-
) -[grid: gpu.grid<X<1>, X<16>>]-> () {
2+
a: &r shrd npu.global [i16; 16],
3+
b: &r uniq npu.global [i16; 16]
4+
) -[grid: npu.grid<X<1>, X<16>>]-> () {
55
b = a;
66
()
77
}

examples/core/func_params.desc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ fn add(a: i32, b: i32) -[t: cpu.thread]-> i32 {
55
fn main() -[t: cpu.thread]-> i32 {
66
add(10, 32)
77
}
8-
9-

examples/core/gpu_mem.desc.off

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
fn add<n: nat, r: prv>(
2-
a: &r shrd gpu.global [i16; 16],
3-
b: &r shrd gpu.global [i16; 16],
4-
c: &r uniq gpu.global [i16; 16]
5-
) -[grid: gpu.grid<X<1>, X<16>>]-> () {
2+
a: &r shrd npu.global [i16; 16],
3+
b: &r shrd npu.global [i16; 16],
4+
c: &r uniq npu.global [i16; 16]
5+
) -[grid: npu.grid<X<1>, X<16>>]-> () {
66
// a = b + c;
77
()
88
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn memory_load<n: nat, r: prv>(
2-
a: &r shrd gpu.global [i16; 16],
3-
b: &r uniq gpu.global [i16; 16]
4-
) -[grid: gpu.grid<X<1>, X<16>>]-> () {
2+
a: &r shrd npu.global [i16; 16],
3+
b: &r uniq npu.global [i16; 16]
4+
) -[grid: npu.grid<X<1>, X<16>>]-> () {
55
()
66
}

examples/core/load_ub.desc.off

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn memory_load<n: nat, r: prv>(
2-
a: &r shrd gpu.global [i16; 16]
3-
) -[grid: gpu.grid<X<1>, X<16>>]-> () {
2+
a: &r shrd npu.global [i16; 16]
3+
) -[grid: npu.grid<X<1>, X<16>>]-> () {
44
a;
55
()
66
}

examples/core/load_ub_twice.desc.off

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
fn memory_load<n: nat, r: prv>(
2-
a: &r shrd gpu.global [i16; 16],
3-
b: &r uniq gpu.global [i16; 16]
4-
) -[grid: gpu.grid<X<1>, X<16>>]-> () {
2+
a: &r shrd npu.global [i16; 16],
3+
b: &r uniq npu.global [i16; 16]
4+
) -[grid: npu.grid<X<1>, X<16>>]-> () {
55
a;
66
b;
77
()

examples/core/vadd.desc.off

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
fn add<n: nat, r: prv>(
2-
a: &r shrd gpu.global [i16; 16],
3-
b: &r shrd gpu.global [i16; 16]
4-
) -[grid: gpu.grid<X<1>, X<16>>]-> () {
2+
a: &r shrd npu.global [i16; 16],
3+
b: &r shrd npu.global [i16; 16]
4+
) -[grid: npu.grid<X<1>, X<16>>]-> () {
55
a + b;
66
()
77
}

0 commit comments

Comments
 (0)