teflon/tests: Divide the tolerance level by a constant
A final tolerance of 0.6 seems to be about right for big models with per-channel quantization. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
This commit is contained in:
@@ -67,7 +67,7 @@ test_model(void *buf, size_t buf_size, std::string cache_dir, unsigned tolerance
|
||||
case kTfLiteFloat32: {
|
||||
float *cpu = ((float**)cpu_output)[i];
|
||||
float *npu = ((float**)npu_output)[i];
|
||||
if (abs(cpu[j] - npu[j]) > tolerance) {
|
||||
if (abs(cpu[j] - npu[j]) > tolerance / 33.0) {
|
||||
std::cout << "CPU: ";
|
||||
for (int k = 0; k < std::min(int(output_sizes[i]), 24); k++)
|
||||
std::cout << std::setfill('0') << std::setw(6) << cpu[k] << " ";
|
||||
|
||||
Reference in New Issue
Block a user