MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / cross_check

Function cross_check

examples/tensorflow/common_utils/common.py:91–95  ·  view source on GitHub ↗
(name, tf_val, op_val, atol_threshold)

Source from the content-addressed store, hash-verified

89 return time_sum * 1000 / iterations
90
91def cross_check(name, tf_val, op_val, atol_threshold):
92 abs_diff = np.fabs(tf_val - op_val)
93 print("[INFO] {} Cross check {}".format(name, np.allclose(tf_val, op_val, atol=atol_threshold)))
94 print("[INFO] Max diff {}".format(abs_diff.max()))
95 print("[INFO] min diff {}".format(abs_diff.min()))
96
97def int_result_cross_check(name, tf_result, op_result, shape):
98 print(" ")

Callers

nothing calls this directly

Calls 2

maxMethod · 0.80
minMethod · 0.80

Tested by

no test coverage detected