[INTEL oneDNN][Bug Fix] Add index-validity  check for min-max tensors for quantized oneDNN ops and related tests
@penpornk  Hi, I notice that there is a failure with "feedback/copybara" check but I could not access the "Details". 

Please let me know if there is anything I need to do. Thanks! Hi @gzmkl,

It was failing internal Windows CPU presubmit (not sure why the github one didn't fail..)
The test that failed is `//tensorflow/core/kernels/mkl:mkl_quantized_conv_ops_test`
```
[  FAILED  ] 11 tests, listed below:
[  FAILED  ] QuantizedConvTest.BiasAddFusion
[  FAILED  ] QuantizedConvTest.BiasAddRequantizeFusion
[  FAILED  ] QuantizedConvTest.BiasAddReluRequantizeFusion
[  FAILED  ] QuantizedConvTest.UnsignedInputBiasAddReluRequantizeFusion
[  FAILED  ] QuantizedConvTest.DWBiasAddFusion
[  FAILED  ] QuantizedConvTest.DWBiasAddRequantizeFusion
[  FAILED  ] QuantizedConvTest.DWBiasAddReluRequantizeFusion
[  FAILED  ] QuantizedConvTest.DWUnsignedInputBiasAddReluRequantizeFusion
[  FAILED  ] QuantizedConvTest.BiasAddSumReluRequantizeFusion
[  FAILED  ] QuantizedConvTest.BiasAddSumReluRequantizeFusionSignedSummand
[  FAILED  ] QuantizedConvTest.BiasAddSumReluFusionFloatSummand
```
Test command:
```
<path_to_bazel.exe> test //tensorflow/core/kernels/mkl:mkl_quantized_conv_ops_test --test_output=all
```

Example test failure log:
```
[ RUN      ] QuantizedConvTest.BiasAddFusion
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (-25 not close to -39.473743438720703)
Expected: true
i = 0 Tx[i] = -25 Ty[i] = -39.473743438720703
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (-5 not close to 5.9996280670166016)
Expected: true
i = 1 Tx[i] = -5 Ty[i] = 5.9996280670166016
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (19 not close to 17.189409255981445)
Expected: true
i = 2 Tx[i] = 19 Ty[i] = 17.189409255981445
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (14 not close to 30.283836364746094)
Expected: true
i = 3 Tx[i] = 14 Ty[i] = 30.283836364746094
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (10 not close to -7.0947980880737305)
Expected: true
i = 4 Tx[i] = 10 Ty[i] = -7.0947980880737305
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (25 not close to 22.093868255615234)
Expected: true
i = 5 Tx[i] = 25 Ty[i] = 22.093868255615234
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (-8 not close to -10.99931812286377)
Expected: true
i = 6 Tx[i] = -8 Ty[i] = -10.99931812286377
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (0 not close to 1.9046437740325928)
Expected: true
i = 7 Tx[i] = 0 Ty[i] = 1.9046437740325928
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (12 not close to 34.1883544921875)
Expected: true
i = 9 Tx[i] = 12 Ty[i] = 34.1883544921875
tensorflow/core/framework/tensor_testutil.cc(184): error: Value of: IsClose(Tx[i], Ty[i], typed_atol, typed_rtol)
  Actual: false (-15 not close to -23.284269332885742)
Expected: true
i = 10 Tx[i] = -15 Ty[i] = -23.284269332885742
tensorflow/core/framework/tensor_testutil.cc(187): error: Expected: (num_failures) < (max_failures), actual: 10 vs 10
```

I'm trying to get to this by tomorrow, but it would be great if you could help debug on your side too (if you could reproduce it). Thank you!  Hi @gzmkl,

I realized that Github's [Windows Bazel presubmit](https://source.cloud.google.com/results/invocations/26083756-8c82-48e9-9d00-6ec3c1e178a8/log) on this PR didn't run any `mkl_` tests at all. So it's not surprising that it passed.

Were you able to reproduce the test failure on your system? If it's helpful, the CPU we used has up to AVX2.

Since it doesn't seem like some simple merging issue, but could be actual issues with the PR, I'll leave the debugging to you. If we can merge this PR by this Wednesday, I can try to cherry-pick this into TF 2.12. Otherwise, we can wait for the patch release (v2.12.1) once this PR is merged. Thank you!
   @penpornk  Thank you for the inputs. Yes, some INT8 (mkl_*quant*test*) does not run on Windows.  TF Windows team (Mayank) and Ramesh also gave me the same feedback. 
 
I just made code change by adding back " &&defined(ENABLE_MKL)" guard in related tests and pushed the commit.
The code change has passed internal Windows UT tests. 
 Exactly. This has been included in our TODO list as we want to enable some of the tests on Windows along with stock TF. 


This is a follow-up PR of the merged PR 

https://github.com/tensorflow/tensorflow/pull/59437

for all oneDNN quantization ops:

The PR adds boundary (rank) check for min-max tensors of all oneDNN quantized ops, which will prevent NPE (null-pointer exception).
  With the added check, index access to an element can happen only after the "index" passes the validity check.