migraphx-benchmark / AMDMIGraphX

AMD's graph optimization engine.
https://rocmsoftwareplatform.github.io/AMDMIGraphX/doc/html/
MIT License
0 stars 1 forks source link

Round inaccuracies #134

Closed attila-dusnoki-htec closed 8 months ago

attila-dusnoki-htec commented 10 months ago

Failing tests:

attila-dusnoki-htec commented 10 months ago
FAIL: test_round_cpu (__main__.OnnxBackendNodeModelTest) ``` ====================================================================== FAIL: test_round_cpu (__main__.OnnxBackendNodeModelTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/onnx/backend/test/runner/__init__.py", line 290, in device_test_func return test_func(*args, device=device, **kwargs) File "/usr/local/lib/python3.8/dist-packages/onnx/backend/test/runner/__init__.py", line 467, in run self.assert_similar_outputs( File "../test/py/onnx_backend_test.py", line 59, in assert_similar_outputs np.testing.assert_allclose(ref_outputs[i], File "/usr/local/lib/python3.8/dist-packages/numpy/testing/_private/utils.py", line 1530, in assert_allclose assert_array_compare(compare, actual, desired, err_msg=str(err_msg), File "/usr/local/lib/python3.8/dist-packages/numpy/testing/_private/utils.py", line 844, in assert_array_compare raise AssertionError(msg) AssertionError: Not equal to tolerance rtol=0.001, atol=1e-05 Program = module: "main" x = @param:x -> float_type, {15}, {1}, target_id=0 @1 = round(x) -> float_type, {15}, {1}, target_id=0 @2 = @return(@1), target_id=0 Compiled program = module: "main" @0 = check_context::migraphx::gpu::context -> float_type, {}, {}, target_id=0 @1 = hip::hip_allocate_memory[shape=int8_type, {120}, {1},id=main:scratch] -> int8_type, {120}, {1}, target_id=0 x = @param:x -> float_type, {15}, {1}, target_id=0 @3 = load[offset=60,end=120](@1) -> float_type, {15}, {1}, target_id=0 @4 = hip::copy_to_gpu(x,@3) -> float_type, {15}, {1}, target_id=0 @5 = load[offset=0,end=60](@1) -> float_type, {15}, {1}, target_id=0 @6 = gpu::code_object[code_object=9528,symbol_name=round_kernel,global=1024,local=1024,](@4,@5) -> float_type, {15}, {1}, target_id=0 @7 = hip::copy_from_gpu(@6) -> float_type, {15}, {1}, target_id=0 @8 = hip::sync_stream(@7) -> float_type, {15}, {1}, target_id=0 @9 = @return(@8), target_id=0 Mismatched elements: 3 / 15 (20%) Max absolute difference: 1. Max relative difference: 1. x: array([ 0., 0., 1., 1., 2., 2., 2., 2., 3., -1., -2., -2., -2., -2., -3.], dtype=float32) y: array([ 0., 1., 1., 1., 2., 2., 2., 3., 3., -1., -2., -2., -2., -3., -3.], dtype=float32) ```