Skip to content

Commit 75c8654

Browse files
committed
test cleanup
1 parent d09e8a9 commit 75c8654

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

test/test_gpu.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,14 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
7171
void testNumTypeSizes() {
7272
LOG(kDefLog, kInfo, "Running testNumTypeSizes...");
7373

74-
// kf16 and kf32 expected sizes
75-
// Adjust these values if your implementation differs.
74+
7675
assert(sizeBytes(kf16) == 2);
7776
assert(sizeBytes(kf32) == 4);
78-
79-
// For the integer types, we compare against the sizeof the respective type.
8077
assert(sizeBytes(ki8) == sizeof(uint8_t)); // typically 1
8178
assert(sizeBytes(ki16) == sizeof(uint16_t)); // typically 2
8279
assert(sizeBytes(ki32) == sizeof(int32_t)); // typically 4
8380
assert(sizeBytes(ku8) == sizeof(uint8_t)); // typically 1
8481
assert(sizeBytes(ku16) == sizeof(uint16_t)); // typically 2
85-
// Assuming ku32 should be sizeof(uint32_t)
8682
assert(sizeBytes(ku32) == sizeof(uint32_t)); // typically 4
8783

8884
LOG(kDefLog, kInfo, "testNumTypeSizes passed.");
@@ -105,7 +101,6 @@ void testToCPUWithHalf() {
105101
inputData[i] = half(static_cast<float>(i));
106102
}
107103

108-
// Create a tensor for half data using the kf16 type.
109104
Tensor inputTensor = createTensor(ctx, Shape{N}, kf16, inputData.data());
110105

111106
// Copy GPU output to CPU.
@@ -138,7 +133,6 @@ void testToCPUWithFloat() {
138133
outputData[i] = 0.0f;
139134
}
140135

141-
// Create a tensor for float data using the kf32 type.
142136
Tensor inputTensor = createTensor(ctx, Shape{N}, kf32, inputData.data());
143137

144138
// Copy GPU output to CPU.
@@ -299,7 +293,6 @@ void testToCPUWithint64() {
299293
outputData[i] = 0;
300294
}
301295

302-
// Assuming a new NumType 'ki64' for 64-bit integers.
303296
Tensor inputTensor = createTensor(ctx, Shape{N}, ki64, inputData.data());
304297

305298
// Copy GPU output to CPU.
@@ -331,7 +324,6 @@ void testToCPUWithUint8() {
331324
Tensor inputTensor = createTensor(
332325
ctx, Shape{N}, ku8, reinterpret_cast<const uint8_t *>(inputData.data()));
333326

334-
// Synchronously copy GPU output to CPU using the tensor overload.
335327
toCPU(ctx, inputTensor, outputData.data(), sizeof(outputData));
336328

337329
// Verify the output matches the input.

0 commit comments

Comments
 (0)