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

Function cross_check

examples/tensorflow/decoder/utils/common.py:275–279  ·  view source on GitHub ↗
(name, tf_val, op_val, atol_threshold)

Source from the content-addressed store, hash-verified

273 return time_sum * 1000 / iterations
274
275def cross_check(name, tf_val, op_val, atol_threshold):
276 abs_diff = np.fabs(tf_val - op_val)
277 print("[INFO] {} Cross check {}".format(name, np.allclose(tf_val, op_val, atol=atol_threshold)))
278 print("[INFO] Max diff {}".format(abs_diff.max()))
279 print("[INFO] min diff {}".format(abs_diff.min()))
280
281def int_result_cross_check(name, tf_result, op_result, shape):
282 print(" ")

Callers 1

mainFunction · 0.90

Calls 2

maxMethod · 0.80
minMethod · 0.80

Tested by

no test coverage detected