Skip to content

Commit 881e067

Browse files
committed
Bless compiletests
1 parent 2b4a758 commit 881e067

16 files changed

+639
-2
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
error[E0277]: `CustomType` cannot be used as a tensor core matrix element
2+
--> $DIR/custom_type.rs:11:15
3+
|
4+
11 | let _tc = TensorCore::<CustomType, dims::Shape<16, 16, 16>>::new();
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a valid matrix element type
6+
|
7+
= help: the trait `MatrixElement` is not implemented for `CustomType`
8+
= note: Valid element types are: f16, bf16, f32, f64, i8, u8, i32, bool
9+
= note: f16/bf16 are for half-precision operations, f32 uses TF32 mode, i8/u8 for integer operations
10+
= note: See NVIDIA documentation: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-matrix-functions
11+
= help: the following other types implement trait `MatrixElement`:
12+
bf16
13+
bool
14+
cuda_std::f16
15+
f32
16+
f64
17+
i32
18+
i8
19+
u8
20+
note: required by a bound in `TensorCore`
21+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:2799:26
22+
|
23+
2799 | pub struct TensorCore<T: MatrixElement, Shape: TensorCoreShape> {
24+
| ^^^^^^^^^^^^^ required by this bound in `TensorCore`
25+
26+
error[E0599]: the function or associated item `new` exists for struct `TensorCore<CustomType, Shape<16, 16, 16>>`, but its trait bounds were not satisfied
27+
--> $DIR/custom_type.rs:11:66
28+
|
29+
6 | struct CustomType;
30+
| ----------------- doesn't satisfy `CustomType: MatrixElement`
31+
...
32+
11 | let _tc = TensorCore::<CustomType, dims::Shape<16, 16, 16>>::new();
33+
| ^^^ function or associated item cannot be called on `TensorCore<CustomType, Shape<16, 16, 16>>` due to unsatisfied trait bounds
34+
|
35+
= note: the following trait bounds were not satisfied:
36+
`CustomType: MatrixElement`
37+
note: the trait `MatrixElement` must be implemented
38+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:1262:1
39+
|
40+
1262 | pub trait MatrixElement: Copy + sealed::Sealed {
41+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+
error: aborting due to 2 previous errors
44+
45+
Some errors have detailed explanations: E0277, E0599.
46+
For more information about an error, try `rustc --explain E0277`.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
error[E0277]: `u16` cannot be used as a tensor core matrix element
2+
--> $DIR/u16.rs:9:15
3+
|
4+
9 | let _tc = TensorCore::<u16, dims::Shape<16, 16, 16>>::new();
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a valid matrix element type
6+
|
7+
= help: the trait `MatrixElement` is not implemented for `u16`
8+
= note: Valid element types are: f16, bf16, f32, f64, i8, u8, i32, bool
9+
= note: f16/bf16 are for half-precision operations, f32 uses TF32 mode, i8/u8 for integer operations
10+
= note: See NVIDIA documentation: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-matrix-functions
11+
= help: the following other types implement trait `MatrixElement`:
12+
f32
13+
f64
14+
i32
15+
i8
16+
u8
17+
note: required by a bound in `TensorCore`
18+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:2799:26
19+
|
20+
2799 | pub struct TensorCore<T: MatrixElement, Shape: TensorCoreShape> {
21+
| ^^^^^^^^^^^^^ required by this bound in `TensorCore`
22+
23+
error[E0599]: the function or associated item `new` exists for struct `TensorCore<u16, Shape<16, 16, 16>>`, but its trait bounds were not satisfied
24+
--> $DIR/u16.rs:9:59
25+
|
26+
9 | let _tc = TensorCore::<u16, dims::Shape<16, 16, 16>>::new();
27+
| ^^^ function or associated item cannot be called on `TensorCore<u16, Shape<16, 16, 16>>` due to unsatisfied trait bounds
28+
|
29+
= note: the following trait bounds were not satisfied:
30+
`u16: MatrixElement`
31+
32+
error: aborting due to 2 previous errors
33+
34+
Some errors have detailed explanations: E0277, E0599.
35+
For more information about an error, try `rustc --explain E0277`.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
error[E0277]: `CustomLayout` is not a valid matrix layout
2+
--> $DIR/custom_layout.rs:17:17
3+
|
4+
17 | acc.store::<CustomLayout, 16>(ptr);
5+
| ----- ^^^^^^^^^^^^ invalid layout type
6+
| |
7+
| required by a bound introduced by this call
8+
|
9+
= help: the trait `cuda_std::warp::Layout` is not implemented for `CustomLayout`
10+
= note: Use either layout::Row or layout::Col for matrix layout
11+
= help: the following other types implement trait `cuda_std::warp::Layout`:
12+
Col
13+
Row
14+
note: required by a bound in `Accumulator::<T, Shape>::store`
15+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:1516:12
16+
|
17+
1514 | pub unsafe fn store<L, const STRIDE: usize>(&self, ptr: *mut T)
18+
| ----- required by a bound in this associated function
19+
1515 | where
20+
1516 | L: Layout,
21+
| ^^^^^^ required by this bound in `Accumulator::<T, Shape>::store`
22+
23+
error[E0277]: Cannot store accumulator: `f32` with shape `cuda_std::warp::matrix::dims::Shape<16, 16, 16>` and layout `CustomLayout` is not supported
24+
--> $DIR/custom_layout.rs:17:17
25+
|
26+
17 | acc.store::<CustomLayout, 16>(ptr);
27+
| ^^^^^^^^^^^^ unsupported accumulator store configuration
28+
|
29+
= help: the trait `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<16, 16, 16>, CustomLayout>` is not implemented for `f32`
30+
= note: This combination of accumulator type, shape, and layout doesn't have a corresponding store implementation
31+
= help: the following other types implement trait `matrix::ops::StoreMatrixD<Shape, L>`:
32+
`f32` implements `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<16, 16, 16>, Col>`
33+
`f32` implements `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<16, 16, 16>, Row>`
34+
`f32` implements `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<16, 16, 8>, Col>`
35+
`f32` implements `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<16, 16, 8>, Row>`
36+
`f32` implements `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<32, 8, 16>, Col>`
37+
`f32` implements `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<32, 8, 16>, Row>`
38+
`f32` implements `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<8, 32, 16>, Col>`
39+
`f32` implements `matrix::ops::StoreMatrixD<cuda_std::warp::matrix::dims::Shape<8, 32, 16>, Row>`
40+
note: required by a bound in `Accumulator::<T, Shape>::store`
41+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:1518:12
42+
|
43+
1514 | pub unsafe fn store<L, const STRIDE: usize>(&self, ptr: *mut T)
44+
| ----- required by a bound in this associated function
45+
...
46+
1518 | T: ops::StoreMatrixD<Shape, L>,
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Accumulator::<T, Shape>::store`
48+
49+
error: aborting due to 2 previous errors
50+
51+
For more information about this error, try `rustc --explain E0277`.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
error[E0277]: `Shape<17, 17, 17>` is not a valid tensor core shape
2+
--> $DIR/invalid_dims.rs:11:19
3+
|
4+
11 | let invalid = TensorCore::<f16, dims::Shape<17, 17, 17>>::new();
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid tensor core shape
6+
|
7+
= help: the trait `TensorCoreShape` is not implemented for `Shape<17, 17, 17>`
8+
= note: See NVIDIA documentation: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-matrix-functions
9+
= help: the following other types implement trait `TensorCoreShape`:
10+
Shape<16, 16, 16>
11+
Shape<16, 16, 8>
12+
Shape<32, 8, 16>
13+
Shape<8, 32, 16>
14+
Shape<8, 8, 128>
15+
Shape<8, 8, 32>
16+
Shape<8, 8, 4>
17+
note: required by a bound in `TensorCore`
18+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:2799:48
19+
|
20+
2799 | pub struct TensorCore<T: MatrixElement, Shape: TensorCoreShape> {
21+
| ^^^^^^^^^^^^^^^ required by this bound in `TensorCore`
22+
23+
error[E0599]: the function or associated item `new` exists for struct `TensorCore<cuda_std::f16, Shape<17, 17, 17>>`, but its trait bounds were not satisfied
24+
--> $DIR/invalid_dims.rs:11:63
25+
|
26+
11 | let invalid = TensorCore::<f16, dims::Shape<17, 17, 17>>::new();
27+
| ^^^ function or associated item cannot be called on `TensorCore<cuda_std::f16, Shape<17, 17, 17>>` due to unsatisfied trait bounds
28+
|
29+
::: /workspace/crates/cuda_std/src/warp/matrix.rs:1159:5
30+
|
31+
1159 | pub struct Shape<const M: usize, const N: usize, const K: usize>;
32+
| ---------------------------------------------------------------- doesn't satisfy `Shape<17, 17, 17>: TensorCoreShape`
33+
|
34+
= note: the following trait bounds were not satisfied:
35+
`Shape<17, 17, 17>: TensorCoreShape`
36+
37+
error[E0277]: `Shape<64, 64, 64>` is not a valid tensor core shape
38+
--> $DIR/invalid_dims.rs:15:21
39+
|
40+
15 | let too_large = TensorCore::<f16, dims::Shape<64, 64, 64>>::new();
41+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid tensor core shape
42+
|
43+
= help: the trait `TensorCoreShape` is not implemented for `Shape<64, 64, 64>`
44+
= note: See NVIDIA documentation: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-matrix-functions
45+
= help: the following other types implement trait `TensorCoreShape`:
46+
Shape<16, 16, 16>
47+
Shape<16, 16, 8>
48+
Shape<32, 8, 16>
49+
Shape<8, 32, 16>
50+
Shape<8, 8, 128>
51+
Shape<8, 8, 32>
52+
Shape<8, 8, 4>
53+
note: required by a bound in `TensorCore`
54+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:2799:48
55+
|
56+
2799 | pub struct TensorCore<T: MatrixElement, Shape: TensorCoreShape> {
57+
| ^^^^^^^^^^^^^^^ required by this bound in `TensorCore`
58+
59+
error[E0599]: the function or associated item `new` exists for struct `TensorCore<cuda_std::f16, Shape<64, 64, 64>>`, but its trait bounds were not satisfied
60+
--> $DIR/invalid_dims.rs:15:65
61+
|
62+
15 | let too_large = TensorCore::<f16, dims::Shape<64, 64, 64>>::new();
63+
| ^^^ function or associated item cannot be called on `TensorCore<cuda_std::f16, Shape<64, 64, 64>>` due to unsatisfied trait bounds
64+
|
65+
::: /workspace/crates/cuda_std/src/warp/matrix.rs:1159:5
66+
|
67+
1159 | pub struct Shape<const M: usize, const N: usize, const K: usize>;
68+
| ---------------------------------------------------------------- doesn't satisfy `Shape<64, 64, 64>: TensorCoreShape`
69+
|
70+
= note: the following trait bounds were not satisfied:
71+
`Shape<64, 64, 64>: TensorCoreShape`
72+
73+
error[E0277]: `Shape<1, 1, 1>` is not a valid tensor core shape
74+
--> $DIR/invalid_dims.rs:19:21
75+
|
76+
19 | let too_small = TensorCore::<f16, dims::Shape<1, 1, 1>>::new();
77+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid tensor core shape
78+
|
79+
= help: the trait `TensorCoreShape` is not implemented for `Shape<1, 1, 1>`
80+
= note: See NVIDIA documentation: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-matrix-functions
81+
= help: the following other types implement trait `TensorCoreShape`:
82+
Shape<16, 16, 16>
83+
Shape<16, 16, 8>
84+
Shape<32, 8, 16>
85+
Shape<8, 32, 16>
86+
Shape<8, 8, 128>
87+
Shape<8, 8, 32>
88+
Shape<8, 8, 4>
89+
note: required by a bound in `TensorCore`
90+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:2799:48
91+
|
92+
2799 | pub struct TensorCore<T: MatrixElement, Shape: TensorCoreShape> {
93+
| ^^^^^^^^^^^^^^^ required by this bound in `TensorCore`
94+
95+
error[E0599]: the function or associated item `new` exists for struct `TensorCore<cuda_std::f16, Shape<1, 1, 1>>`, but its trait bounds were not satisfied
96+
--> $DIR/invalid_dims.rs:19:62
97+
|
98+
19 | let too_small = TensorCore::<f16, dims::Shape<1, 1, 1>>::new();
99+
| ^^^ function or associated item cannot be called on `TensorCore<cuda_std::f16, Shape<1, 1, 1>>` due to unsatisfied trait bounds
100+
|
101+
::: /workspace/crates/cuda_std/src/warp/matrix.rs:1159:5
102+
|
103+
1159 | pub struct Shape<const M: usize, const N: usize, const K: usize>;
104+
| ---------------------------------------------------------------- doesn't satisfy `Shape<1, 1, 1>: TensorCoreShape`
105+
|
106+
= note: the following trait bounds were not satisfied:
107+
`Shape<1, 1, 1>: TensorCoreShape`
108+
109+
error: aborting due to 6 previous errors
110+
111+
Some errors have detailed explanations: E0277, E0599.
112+
For more information about an error, try `rustc --explain E0277`.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
error[E0277]: `Shape<16, 16, 3>` is not a valid tensor core shape
2+
--> $DIR/k_invalid.rs:10:15
3+
|
4+
10 | let _tc = TensorCore::<f16, dims::Shape<16, 16, 3>>::new();
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid tensor core shape
6+
|
7+
= help: the trait `TensorCoreShape` is not implemented for `Shape<16, 16, 3>`
8+
= note: See NVIDIA documentation: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-matrix-functions
9+
= help: the following other types implement trait `TensorCoreShape`:
10+
Shape<16, 16, 16>
11+
Shape<16, 16, 8>
12+
Shape<32, 8, 16>
13+
Shape<8, 32, 16>
14+
Shape<8, 8, 128>
15+
Shape<8, 8, 32>
16+
Shape<8, 8, 4>
17+
note: required by a bound in `TensorCore`
18+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:2799:48
19+
|
20+
2799 | pub struct TensorCore<T: MatrixElement, Shape: TensorCoreShape> {
21+
| ^^^^^^^^^^^^^^^ required by this bound in `TensorCore`
22+
23+
error[E0599]: the function or associated item `new` exists for struct `TensorCore<cuda_std::f16, Shape<16, 16, 3>>`, but its trait bounds were not satisfied
24+
--> $DIR/k_invalid.rs:10:58
25+
|
26+
10 | let _tc = TensorCore::<f16, dims::Shape<16, 16, 3>>::new();
27+
| ^^^ function or associated item cannot be called on `TensorCore<cuda_std::f16, Shape<16, 16, 3>>` due to unsatisfied trait bounds
28+
|
29+
::: /workspace/crates/cuda_std/src/warp/matrix.rs:1159:5
30+
|
31+
1159 | pub struct Shape<const M: usize, const N: usize, const K: usize>;
32+
| ---------------------------------------------------------------- doesn't satisfy `Shape<16, 16, 3>: TensorCoreShape`
33+
|
34+
= note: the following trait bounds were not satisfied:
35+
`Shape<16, 16, 3>: TensorCoreShape`
36+
37+
error: aborting due to 2 previous errors
38+
39+
Some errors have detailed explanations: E0277, E0599.
40+
For more information about an error, try `rustc --explain E0277`.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
error[E0277]: `Shape<7, 8, 16>` is not a valid tensor core shape
2+
--> $DIR/m_not_power_of_two.rs:10:15
3+
|
4+
10 | let _tc = TensorCore::<f16, dims::Shape<7, 8, 16>>::new();
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid tensor core shape
6+
|
7+
= help: the trait `TensorCoreShape` is not implemented for `Shape<7, 8, 16>`
8+
= note: See NVIDIA documentation: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-matrix-functions
9+
= help: the following other types implement trait `TensorCoreShape`:
10+
Shape<16, 16, 16>
11+
Shape<16, 16, 8>
12+
Shape<32, 8, 16>
13+
Shape<8, 32, 16>
14+
Shape<8, 8, 128>
15+
Shape<8, 8, 32>
16+
Shape<8, 8, 4>
17+
note: required by a bound in `TensorCore`
18+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:2799:48
19+
|
20+
2799 | pub struct TensorCore<T: MatrixElement, Shape: TensorCoreShape> {
21+
| ^^^^^^^^^^^^^^^ required by this bound in `TensorCore`
22+
23+
error[E0599]: the function or associated item `new` exists for struct `TensorCore<cuda_std::f16, Shape<7, 8, 16>>`, but its trait bounds were not satisfied
24+
--> $DIR/m_not_power_of_two.rs:10:57
25+
|
26+
10 | let _tc = TensorCore::<f16, dims::Shape<7, 8, 16>>::new();
27+
| ^^^ function or associated item cannot be called on `TensorCore<cuda_std::f16, Shape<7, 8, 16>>` due to unsatisfied trait bounds
28+
|
29+
::: /workspace/crates/cuda_std/src/warp/matrix.rs:1159:5
30+
|
31+
1159 | pub struct Shape<const M: usize, const N: usize, const K: usize>;
32+
| ---------------------------------------------------------------- doesn't satisfy `Shape<7, 8, 16>: TensorCoreShape`
33+
|
34+
= note: the following trait bounds were not satisfied:
35+
`Shape<7, 8, 16>: TensorCoreShape`
36+
37+
error: aborting due to 2 previous errors
38+
39+
Some errors have detailed explanations: E0277, E0599.
40+
For more information about an error, try `rustc --explain E0277`.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
error[E0277]: `Shape<16, 15, 16>` is not a valid tensor core shape
2+
--> $DIR/n_invalid.rs:10:15
3+
|
4+
10 | let _tc = TensorCore::<f16, dims::Shape<16, 15, 16>>::new();
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid tensor core shape
6+
|
7+
= help: the trait `TensorCoreShape` is not implemented for `Shape<16, 15, 16>`
8+
= note: See NVIDIA documentation: https://docs.nvidia.com/cuda/cuda-c-programming-guide/#warp-matrix-functions
9+
= help: the following other types implement trait `TensorCoreShape`:
10+
Shape<16, 16, 16>
11+
Shape<16, 16, 8>
12+
Shape<32, 8, 16>
13+
Shape<8, 32, 16>
14+
Shape<8, 8, 128>
15+
Shape<8, 8, 32>
16+
Shape<8, 8, 4>
17+
note: required by a bound in `TensorCore`
18+
--> /workspace/crates/cuda_std/src/warp/matrix.rs:2799:48
19+
|
20+
2799 | pub struct TensorCore<T: MatrixElement, Shape: TensorCoreShape> {
21+
| ^^^^^^^^^^^^^^^ required by this bound in `TensorCore`
22+
23+
error[E0599]: the function or associated item `new` exists for struct `TensorCore<cuda_std::f16, Shape<16, 15, 16>>`, but its trait bounds were not satisfied
24+
--> $DIR/n_invalid.rs:10:59
25+
|
26+
10 | let _tc = TensorCore::<f16, dims::Shape<16, 15, 16>>::new();
27+
| ^^^ function or associated item cannot be called on `TensorCore<cuda_std::f16, Shape<16, 15, 16>>` due to unsatisfied trait bounds
28+
|
29+
::: /workspace/crates/cuda_std/src/warp/matrix.rs:1159:5
30+
|
31+
1159 | pub struct Shape<const M: usize, const N: usize, const K: usize>;
32+
| ---------------------------------------------------------------- doesn't satisfy `Shape<16, 15, 16>: TensorCoreShape`
33+
|
34+
= note: the following trait bounds were not satisfied:
35+
`Shape<16, 15, 16>: TensorCoreShape`
36+
37+
error: aborting due to 2 previous errors
38+
39+
Some errors have detailed explanations: E0277, E0599.
40+
For more information about an error, try `rustc --explain E0277`.

0 commit comments

Comments
 (0)