tensor: generate 8x8 in correctness script
This commit is contained in:
@@ -254,6 +254,7 @@ void vx_spawn_tasks_cluster(int num_tasks, vx_spawn_tasks_cb callback, void *arg
|
|||||||
vx_wspawn_wait();
|
vx_wspawn_wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: this is incomplete
|
||||||
// TODO: Instead of launching an additional wave just to work on remaining
|
// TODO: Instead of launching an additional wave just to work on remaining
|
||||||
// threads, handle this in the last wave amongst other full warps.
|
// threads, handle this in the last wave amongst other full warps.
|
||||||
if (rem_threads_in_last_warp != 0 && core_id_in_cluster == 0) {
|
if (rem_threads_in_last_warp != 0 && core_id_in_cluster == 0) {
|
||||||
|
|||||||
@@ -82,16 +82,23 @@ with open(file) as f:
|
|||||||
|
|
||||||
|
|
||||||
expected = np.load("abc.npz")
|
expected = np.load("abc.npz")
|
||||||
expected_A = expected['A_array']
|
# expected_A = expected['A_array']
|
||||||
expected_B = expected['B_array']
|
# expected_B = expected['B_array']
|
||||||
expected_C = expected['C_array']
|
# expected_C = expected['C_array']
|
||||||
|
expected_A = expected['A_array'][0:8, 0:8]
|
||||||
|
expected_B = expected['B_array'][0:8, 0:8]
|
||||||
|
expected_C = expected['C_array'][0:8, 0:8]
|
||||||
expected_C = expected_C + expected_A @ expected_B
|
expected_C = expected_C + expected_A @ expected_B
|
||||||
|
print('expected A:')
|
||||||
|
print(expected_A)
|
||||||
|
print('expected B:')
|
||||||
|
print(expected_B)
|
||||||
print('expected C:')
|
print('expected C:')
|
||||||
print(expected_C[0:8, 0:8])
|
print(expected_C[0:8, 0:8])
|
||||||
print('got C:')
|
print('got C:')
|
||||||
print(C_array[0:8, 0:8])
|
print(C_array[0:8, 0:8])
|
||||||
print('diff C:')
|
print('diff C:')
|
||||||
print((expected_C - C_array)[0:8, 0:8])
|
print(expected_C[0:8, 0:8] - C_array[0:8, 0:8])
|
||||||
|
|
||||||
expected_C.astype('float32').tofile("c_expected.bin")
|
expected_C.astype('float32').tofile("c_expected.bin")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user