Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
wejoncy committed Oct 19, 2024
1 parent db29664 commit fec9d5a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions onnxruntime/test/contrib_ops/layer_norm_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ TYPED_TEST(LayerNormTest, LayerNorm17_opset) {
test.AddInput<TypeParam>("x", dims, GetTypedArray<TypeParam>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}));
test.AddInput<TypeParam>("gamma", {3}, GetTypedArray<TypeParam>({1.0f, 1.0f, 1.0f}), is_initializer);
test.AddOutput<TypeParam>("output", dims, GetTypedArray<TypeParam>({-1.2247f, 0.0f, 1.2247f, -1.2247f, 0.0f, 1.2247f}));
if (std::is_same<TypeParam, MLFloat16>::value|| is_initializer) {
if (std::is_same<TypeParam, MLFloat16>::value) {
std::vector<std::unique_ptr<IExecutionProvider>> execution_providers;
execution_providers.push_back(DefaultCoreMLExecutionProvider(true));
// coreml EP requires weight and bias to be initializers
Expand All @@ -292,8 +292,14 @@ TYPED_TEST(LayerNormTest, LayerNorm17_opset) {
test.Run();
}
};
if (std::is_same<TypeParam, MLFloat16>::value) {
#if !definded(COREML_ENABLE_MLPROGRAM) && !defined(USE_CUDA)

Check failure on line 296 in onnxruntime/test/contrib_ops/layer_norm_op_test.cc

View workflow job for this annotation

GitHub Actions / Vcpkg

token is not a valid binary operator in a preprocessor subexpression
return;
#endif
}

run_test(false);
#ifdef COREML_ENABLE_MLPROGRAM
#if definded(COREML_ENABLE_MLPROGRAM)

Check failure on line 302 in onnxruntime/test/contrib_ops/layer_norm_op_test.cc

View workflow job for this annotation

GitHub Actions / Vcpkg

function-like macro 'definded' is not defined
// gamma as initialized will fail for CPUEP
run_test(true);
#endif
Expand Down

0 comments on commit fec9d5a

Please sign in to comment.