[tfjs-backend-webgl] Test fails on MacOS M1
System information
- OS Platform and Distribution: MacOS 12.4 M1
- TensorFlow.js version: 0a9fdbd
- Browser version: Google Chrome 102.0.5005.61
Describe the current behavior
6 tests failed with the following log when running yarn test on MacOS M1. All of those tests are related to NaN checks.
When on WSL2, all tests passed and everything was fine.
Chrome 102.0.5005.61 (Mac OS 10.15.7) maxPoolWithArgmax webgl2 {"WEBGL_VERSION":2,"WEBGL_CPU_FORWARD":false,"WEBGL_SIZE_UPLOAD_UNIFORM":0} [x=[1,3,3,1] f=[2,2] s=1 ignores NaNs FAILED
Error: Arrays differ: actual[0] = 0, expected[0] = 4.
at <Jasmine>
at expectArraysPredicate (tfjs-core/src/test_util.ts:90:13 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:6765:15)
at expectArraysClose (tfjs-core/src/test_util.ts:32:10 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:6727:12)
at ../../tfjs-core/src/ops/max_pool_with_argmax_test.ts:109:5 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:72016:11
at <Jasmine>
at fulfilled (tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:39:27)
Chrome 102.0.5005.61 (Mac OS 10.15.7) notEqual webgl2 {"WEBGL_VERSION":2,"WEBGL_CPU_FORWARD":false,"WEBGL_SIZE_UPLOAD_
UNIFORM":0} NaNs in Tensor1D - float32 FAILED
Error: Arrays differ: actual[1] = 0, expected[1] = 1.
at <Jasmine>
at expectArraysPredicate (tfjs-core/src/test_util.ts:90:13 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_t
est_bundle.js:6765:15)
at expectArraysClose (tfjs-core/src/test_util.ts:32:10 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_
bundle.js:6727:12)
at ../../tfjs-core/src/ops/not_equal_test.ts:98:5 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundl
e.js:73658:11
at <Jasmine>
at fulfilled (tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:39:27)
Chrome 102.0.5005.61 (Mac OS 10.15.7) notEqual webgl2 {"WEBGL_VERSION":2,"WEBGL_CPU_FORWARD":false,"WEBGL_SIZE_UPLOAD_
UNIFORM":0} NaNs in Tensor3D - float32 FAILED
Error: Arrays differ: actual[1] = 0, expected[1] = 1.
at <Jasmine>
at expectArraysPredicate (tfjs-core/src/test_util.ts:90:13 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_t
est_bundle.js:6765:15)
at expectArraysClose (tfjs-core/src/test_util.ts:32:10 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_
bundle.js:6727:12)
at ../../tfjs-core/src/ops/not_equal_test.ts:221:5 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_bund
le.js:73754:11
at <Jasmine>
at fulfilled (tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:39:27)
Chrome 102.0.5005.61 (Mac OS 10.15.7) notEqual webgl2 {"WEBGL_VERSION":2,"WEBGL_CPU_FORWARD":false,"WEBGL_SIZE_UPLOAD_
UNIFORM":0} NaNs in Tensor4D - float32 FAILED
Error: Arrays differ: actual[1] = 0, expected[1] = 1.
at <Jasmine>
at expectArraysPredicate (tfjs-core/src/test_util.ts:90:13 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_t
est_bundle.js:6765:15)
at expectArraysClose (tfjs-core/src/test_util.ts:32:10 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_
bundle.js:6727:12)
at ../../tfjs-core/src/ops/not_equal_test.ts:275:5 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_bund
le.js:73799:11
at <Jasmine>
at fulfilled (tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:39:27)
Chrome 102.0.5005.61 (Mac OS 10.15.7) notEqual webgl2 {"WEBGL_VERSION":2,"WEBGL_CPU_FORWARD":false,"WEBGL_SIZE_UPLOAD_
UNIFORM":0} NaNs in Tensor2D - float32 FAILED
Error: Arrays differ: actual[1] = 0, expected[1] = 1.
at <Jasmine>
at expectArraysPredicate (tfjs-core/src/test_util.ts:90:13 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_t
est_bundle.js:6765:15)
at expectArraysClose (tfjs-core/src/test_util.ts:32:10 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_
bundle.js:6727:12)
at ../../tfjs-core/src/ops/not_equal_test.ts:151:5 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_bund
le.js:73704:11
at <Jasmine>
at fulfilled (tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:39:27)
Chrome 102.0.5005.61 (Mac OS 10.15.7) notEqual webgl2 {"WEBGL_VERSION":2,"WEBGL_CPU_FORWARD":false,"WEBGL_SIZE_UPLOAD_
UNIFORM":0} works with NaNs FAILED
Error: Arrays differ: actual[2] = 0, expected[2] = 1.
at <Jasmine>
at expectArraysPredicate (tfjs-core/src/test_util.ts:90:13 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_t
est_bundle.js:6765:15)
at expectArraysEqual (tfjs-core/src/test_util.ts:117:10 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test
_bundle.js:6779:12)
at ../../tfjs-core/src/ops/not_equal_test.ts:106:5 <- tfjs/tfjs-backend-webgl/src/tfjs-backend-webgl_test_bund
le.js:73665:11
at <Jasmine>
at fulfilled (tfjs-backend-webgl/src/tfjs-backend-webgl_test_bundle.js:39:27)
TOTAL: 6 FAILED, 4439 SUCCESS
Describe the expected behavior All tests should pass.
Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
Full test log: test.log
Hi @kinsei0916 you are trying the changes which are not released , can you try latest stable release(3.18.0)
Hi @rthadur, I tried on 3.18.0 as well and still get the exact same error.
Please try on latest version(3.19.0) and also could please share the steps which you are following ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.