From 349659315250e4ad5a33646844cb9d9542434b77 Mon Sep 17 00:00:00 2001 From: Jiaxingla Date: Wed, 17 Jul 2024 01:22:42 -0700 Subject: [PATCH] revert the change of nv hpp --- include/cutlass/relatively_equal.h | 2 +- .../include/cutlass/util/reference/device/tensor_compare.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/cutlass/relatively_equal.h b/include/cutlass/relatively_equal.h index 6926921be5..fd900b6605 100644 --- a/include/cutlass/relatively_equal.h +++ b/include/cutlass/relatively_equal.h @@ -71,7 +71,7 @@ bool relatively_equal_float(T a, T b, T epsilon, T nonzero_floor) { return true; } else if (a == zero || b == zero || diff < nonzero_floor) { - return diff < (epsilon * nonzero_floor); + return diff < epsilon * nonzero_floor; } return diff < epsilon * (abs_A + abs_B); diff --git a/tools/util/include/cutlass/util/reference/device/tensor_compare.h b/tools/util/include/cutlass/util/reference/device/tensor_compare.h index de96d53122..34e66e8bc0 100644 --- a/tools/util/include/cutlass/util/reference/device/tensor_compare.h +++ b/tools/util/include/cutlass/util/reference/device/tensor_compare.h @@ -95,18 +95,15 @@ __global__ void size_t idx = ThreadIdxX() + BlockDimX() * BlockIdxX(); - //for (; idx < capacity; idx += GridDimX() * BlockDimX()) { - if (idx < capacity ){ + for (; idx < capacity; idx += GridDimX() * BlockDimX()) { Element a = cutlass::ReferenceFactory::get(ptr_A, idx); Element b = cutlass::ReferenceFactory::get(ptr_B, idx); if (!relatively_equal(a, b, epsilon, nonzero_floor)) { *equal = 0; - //printf("error, idx at: %lu, capacity: %lu, a: %f, b: %f\n", idx, capacity, a, b); return; } } - // } } } // namespace kernel