From 831734a46e8139c52ed54b40288c8de89c0813b9 Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Tue, 18 Apr 2023 12:55:02 -0700 Subject: [PATCH] Fix lint errors missed due to new commits (#15558) Follow up of #15524 --- onnxruntime/core/providers/cpu/signal/dft.cc | 9 ++++----- onnxruntime/test/contrib_ops/quantize_ops_test.cc | 2 +- .../framework/kernel_type_str_resolver_utils_test.cc | 4 ++-- .../test/providers/xnnpack/xnnpack_basic_test.cc | 4 ++-- .../test/training_ops/cuda/cross_entropy_test.cc | 4 ++-- .../test/training_ops/cuda/layer_norm_test.cc | 12 ++++++------ 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/onnxruntime/core/providers/cpu/signal/dft.cc b/onnxruntime/core/providers/cpu/signal/dft.cc index 137b76b62a..da5515d12a 100644 --- a/onnxruntime/core/providers/cpu/signal/dft.cc +++ b/onnxruntime/core/providers/cpu/signal/dft.cc @@ -194,10 +194,9 @@ T next_power_of_2(T in) { template static Status dft_bluestein_z_chirp( - OpKernelContext* ctx, const Tensor* X, Tensor* Y, Tensor& b_fft, Tensor& chirp, size_t X_offset, size_t X_stride, size_t Y_offset, size_t Y_stride, - int64_t axis, size_t dft_length, const Tensor* window, bool inverse, InlinedVector>& V, - InlinedVector>& temp_output) { - + OpKernelContext* ctx, const Tensor* X, Tensor* Y, Tensor& b_fft, Tensor& chirp, size_t X_offset, size_t X_stride, size_t Y_offset, size_t Y_stride, + int64_t axis, size_t dft_length, const Tensor* window, bool inverse, InlinedVector>& V, + InlinedVector>& temp_output) { static constexpr T pi = static_cast(3.14159265); AllocatorPtr alloc; @@ -300,7 +299,7 @@ static Status dft_bluestein_z_chirp( // The inverse fft is computed using the same cached vandermonde matrix (V) created by the // forward fft. This reversal causes the output to be reversed as well. // Therefore we undo the reversal when writing the output back out. - c_i = *(a_data + M - i); + c_i = *(a_data + M - i); } out = c_i * chirp_i * scale; } diff --git a/onnxruntime/test/contrib_ops/quantize_ops_test.cc b/onnxruntime/test/contrib_ops/quantize_ops_test.cc index a04ed79286..22f87099dc 100644 --- a/onnxruntime/test/contrib_ops/quantize_ops_test.cc +++ b/onnxruntime/test/contrib_ops/quantize_ops_test.cc @@ -41,7 +41,7 @@ TEST(DequantizeLinearOpTest, DequantizeLinear_per_tensor_float_int8) { } #ifdef USE_CUDA -TEST(DequantizeLinearOpTest, DISABLED_DequantizeLinear_per_tensor_half_uint8) { // Op with name (InsertedCast_x_scale) and type (Cast) Version mismatch. node_version: 19 kernel start version: 13 kernel_end_version: +TEST(DequantizeLinearOpTest, DISABLED_DequantizeLinear_per_tensor_half_uint8) { // Op with name (InsertedCast_x_scale) and type (Cast) Version mismatch. node_version: 19 kernel start version: 13 kernel_end_version: OpTester test("DequantizeLinear", 1, onnxruntime::kMSDomain); std::vector dims{4}; test.AddInput("x", dims, {0, 3, 128, 255}); diff --git a/onnxruntime/test/framework/kernel_type_str_resolver_utils_test.cc b/onnxruntime/test/framework/kernel_type_str_resolver_utils_test.cc index 5a356d57ac..f81a55209a 100644 --- a/onnxruntime/test/framework/kernel_type_str_resolver_utils_test.cc +++ b/onnxruntime/test/framework/kernel_type_str_resolver_utils_test.cc @@ -26,8 +26,8 @@ static Status LoadLayoutTransformationRequiredOpsFromOpSchemas(KernelTypeStrReso return Status::OK(); } -TEST(KernelTypeStrResolverUtilsTest, DISABLED_VerifyLayoutTransformationRequiredOpsResolver) { // actual_resolver.GetOpKernelTypeStrMap() - // Which is: { (com.microsoft:QLinearConv:1, { ("y_scale", +TEST(KernelTypeStrResolverUtilsTest, DISABLED_VerifyLayoutTransformationRequiredOpsResolver) { // actual_resolver.GetOpKernelTypeStrMap() + // Which is: { (com.microsoft:QLinearConv:1, { ("y_scale", KernelTypeStrResolver expected_resolver; ASSERT_STATUS_OK(LoadLayoutTransformationRequiredOpsFromOpSchemas(expected_resolver)); diff --git a/onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc b/onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc index 330fb9ec03..7046e36006 100644 --- a/onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc +++ b/onnxruntime/test/providers/xnnpack/xnnpack_basic_test.cc @@ -264,7 +264,7 @@ TEST(XnnpackEP, TestQDQConvS8S8_per_channel) { RunModelTestWithPath(ort_model_path, "xnnpack_qdq_test_graph_conv_s8s8_perchannel", graph_verify, 0.2f); } -TEST(XnnpackEP, DISABLED_TestAveragePool) { // [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for AveragePool(19) node with name 'node' +TEST(XnnpackEP, DISABLED_TestAveragePool) { // [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for AveragePool(19) node with name 'node' const std::vector input_shape = {1, 2, 3, 3}; auto modelBuilder = [&input_shape](ModelTestBuilder& builder) { auto* input_arg = builder.MakeInput(input_shape, -1.f, 1.f); @@ -517,7 +517,7 @@ TEST(XnnpackEP, DISABLED_TestResize_u8_and_s8_NHWC_half_pixel) { // [ONNXRuntim "xnnpack_qdq_test_graph_resize", {ExpectedEPNodeAssignment::Some, 1e-2f /* fp32_abs_err */}); } -TEST(XnnpackEP, DISABLED_TestResize_u8_and_s8_NHWC_align_corners) { // [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for Resize(19) node with name 'node_token_5' +TEST(XnnpackEP, DISABLED_TestResize_u8_and_s8_NHWC_align_corners) { // [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for Resize(19) node with name 'node_token_5' RunModelTest(BuildQDQResizeTestCase({1, 64, 64, 3} /* input_shape */, {1, 32, 32, 3} /* sizes_data */, "linear" /* mode */, diff --git a/orttraining/orttraining/test/training_ops/cuda/cross_entropy_test.cc b/orttraining/orttraining/test/training_ops/cuda/cross_entropy_test.cc index 295bb25efa..0c64cddc20 100644 --- a/orttraining/orttraining/test/training_ops/cuda/cross_entropy_test.cc +++ b/orttraining/orttraining/test/training_ops/cuda/cross_entropy_test.cc @@ -753,7 +753,7 @@ TEST(CrossEntropyTest, DISABLED_SoftmaxCrossEntropyLossGrad_TinySizeTensor_half) TestSoftmaxCrossEntropyLossGrad({8}, log_prob_dims, index_dims, dX_dims, "none", 0, true, 5e-2); } -TEST(CrossEntropyTest, DISABLED_SoftmaxCrossEntropyLossGrad_SmallSizeTensor_half) { // [E:onnxruntime:Default, compare_provider_test_utils.cc:105 CompareWithCPU] Initialize failed with status: Could not find an implementation for Equal(19) node with name '' +TEST(CrossEntropyTest, DISABLED_SoftmaxCrossEntropyLossGrad_SmallSizeTensor_half) { // [E:onnxruntime:Default, compare_provider_test_utils.cc:105 CompareWithCPU] Initialize failed with status: Could not find an implementation for Equal(19) node with name '' std::vector dY_dims{}; std::vector log_prob_dims{8, 20, 10}; std::vector index_dims{8, 10}; @@ -763,7 +763,7 @@ TEST(CrossEntropyTest, DISABLED_SoftmaxCrossEntropyLossGrad_SmallSizeTensor_half TestSoftmaxCrossEntropyLossGrad({8, 10}, log_prob_dims, index_dims, dX_dims, "none", -1, true, 5e-2); } -TEST(CrossEntropyTest, DISABLED_SoftmaxCrossEntropyLossGrad_LargeSizeTensor_half) { // [E:onnxruntime:Default, compare_provider_test_utils.cc:105 CompareWithCPU] Initialize failed with status: Could not find an implementation for Equal(19) node with name '' +TEST(CrossEntropyTest, DISABLED_SoftmaxCrossEntropyLossGrad_LargeSizeTensor_half) { // [E:onnxruntime:Default, compare_provider_test_utils.cc:105 CompareWithCPU] Initialize failed with status: Could not find an implementation for Equal(19) node with name '' std::vector dY_dims{}; std::vector log_prob_dims{2, 512, 30528}; std::vector index_dims{2, 30528}; diff --git a/orttraining/orttraining/test/training_ops/cuda/layer_norm_test.cc b/orttraining/orttraining/test/training_ops/cuda/layer_norm_test.cc index 0b1f874511..df74a03025 100644 --- a/orttraining/orttraining/test/training_ops/cuda/layer_norm_test.cc +++ b/orttraining/orttraining/test/training_ops/cuda/layer_norm_test.cc @@ -253,8 +253,8 @@ TEST(CudaKernelTest, InvertibleLayerNormGrad_LargeSizeTensor) { TestInvertibleLayerNormGrad(X_dims, -1, 5e-3); } -TEST(CudaKernelTest, DISABLED_InvertibleLayerNormGrad_SmallSizeTensor_FP16) { // Failed to find kernel for Cast(19) (node InsertedCast_Y_grad). Op with name (InsertedCast_Y_grad) and type (Cast) kernel is not supported in CPUExecutionProvider. Encountered following errors: (Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 6 kernel_end_version: 12 - // Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 13 kernel_end_version: +TEST(CudaKernelTest, DISABLED_InvertibleLayerNormGrad_SmallSizeTensor_FP16) { // Failed to find kernel for Cast(19) (node InsertedCast_Y_grad). Op with name (InsertedCast_Y_grad) and type (Cast) kernel is not supported in CPUExecutionProvider. Encountered following errors: (Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 6 kernel_end_version: 12 + // Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 13 kernel_end_version: const std::vector X_dims{4, 20, 128}; TestInvertibleLayerNormGrad(X_dims, -1, 2e-3, true); } @@ -266,14 +266,14 @@ TEST(CudaKernelTest, DISABLED_InvertibleLayerNormGrad_SmallSizeTensor_Intermedia TestInvertibleLayerNormGrad(X_dims, axis, 2e-3, true); } -TEST(CudaKernelTest, DISABLED_InvertibleLayerNormGrad_MidSizeTensor_FP16) { // Failed to find kernel for Cast(19) (node InsertedCast_Y_grad). Op with name (InsertedCast_Y_grad) and type (Cast) kernel is not supported in CPUExecutionProvider. Encountered following errors: (Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 6 kernel_end_version: 12 - // Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 13 kernel_end_version +TEST(CudaKernelTest, DISABLED_InvertibleLayerNormGrad_MidSizeTensor_FP16) { // Failed to find kernel for Cast(19) (node InsertedCast_Y_grad). Op with name (InsertedCast_Y_grad) and type (Cast) kernel is not supported in CPUExecutionProvider. Encountered following errors: (Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 6 kernel_end_version: 12 + // Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 13 kernel_end_version const std::vector X_dims{8, 80, 768}; TestInvertibleLayerNormGrad(X_dims, -1, 2e-3, true); } -TEST(CudaKernelTest, DISABLED_InvertibleLayerNormGrad_LargeSizeTensor_FP16) { // Failed to find kernel for Cast(19) (node InsertedCast_Y_grad). Op with name (InsertedCast_Y_grad) and type (Cast) kernel is not supported in CPUExecutionProvider. Encountered following errors: (Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 6 kernel_end_version: 12 - // Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 13 kernel_end_version: +TEST(CudaKernelTest, DISABLED_InvertibleLayerNormGrad_LargeSizeTensor_FP16) { // Failed to find kernel for Cast(19) (node InsertedCast_Y_grad). Op with name (InsertedCast_Y_grad) and type (Cast) kernel is not supported in CPUExecutionProvider. Encountered following errors: (Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 6 kernel_end_version: 12 + // Op with name (InsertedCast_Y_grad) and type (Cast) Version mismatch. node_version: 19 kernel start version: 13 kernel_end_version: const std::vector X_dims{16, 512, 1024}; TestInvertibleLayerNormGrad(X_dims, -1, 2e-3, true); }