Merge pull request #44117 from ROCmSoftwarePlatform:google_upstream_rocm_csb_fix_201017
PiperOrigin-RevId: 337992997 Change-Id: I72b1a7ead287d1c8cc789e7a2927ea5e9cba0cde
This commit is contained in:
commit
36c8d2acd1
@ -33,6 +33,7 @@ from tensorflow.python.ops import math_ops
|
|||||||
from tensorflow.python.ops import resource_variable_ops
|
from tensorflow.python.ops import resource_variable_ops
|
||||||
from tensorflow.python.ops import variables
|
from tensorflow.python.ops import variables
|
||||||
from tensorflow.python.platform import googletest
|
from tensorflow.python.platform import googletest
|
||||||
|
from tensorflow.python.platform import test
|
||||||
|
|
||||||
|
|
||||||
@test_util.run_all_in_graph_and_eager_modes
|
@test_util.run_all_in_graph_and_eager_modes
|
||||||
@ -886,6 +887,12 @@ class RangeTest(test_util.TensorFlowTestCase):
|
|||||||
class ErfcinvTest(test_util.TensorFlowTestCase):
|
class ErfcinvTest(test_util.TensorFlowTestCase):
|
||||||
|
|
||||||
def testErfcinv(self):
|
def testErfcinv(self):
|
||||||
|
if test.is_built_with_rocm():
|
||||||
|
# The implementation of erfcinv calls ndtri op,
|
||||||
|
# and the ROCm implementaion for ndtri op has a known bug in it
|
||||||
|
# whose fix will be in a forthcoming ROCm release (4.0 ?).
|
||||||
|
# Need to skip this unit-test until that ROCm release is out
|
||||||
|
self.skipTest("ndtri op implementation is buggy on ROCm")
|
||||||
values = np.random.uniform(0.1, 1.9, size=int(1e4)).astype(np.float32)
|
values = np.random.uniform(0.1, 1.9, size=int(1e4)).astype(np.float32)
|
||||||
approx_id = math_ops.erfc(math_ops.erfcinv(values))
|
approx_id = math_ops.erfc(math_ops.erfcinv(values))
|
||||||
self.assertAllClose(values, self.evaluate(approx_id))
|
self.assertAllClose(values, self.evaluate(approx_id))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user