diff --git a/onnxruntime/test/contrib_ops/attention_op_test_helper.cc b/onnxruntime/test/contrib_ops/attention_op_test_helper.cc index bac91aa544..44a9808119 100644 --- a/onnxruntime/test/contrib_ops/attention_op_test_helper.cc +++ b/onnxruntime/test/contrib_ops/attention_op_test_helper.cc @@ -7,7 +7,8 @@ namespace onnxruntime { namespace test { -#if !defined(_MSC_VER) || defined(USE_DML) +// Disable some tests in Windows since prefast build might crash with large test data. +#if !defined(_MSC_VER) void GetWeight_64_3_64(std::vector& weight_data) { weight_data = { -0.004707f, -0.006775f, 0.0009236f, 0.003067f, -0.00806f, 0.00779f, 0.0004425f, 0.00846f, 0.00048f, diff --git a/onnxruntime/test/contrib_ops/attention_op_test_helper.h b/onnxruntime/test/contrib_ops/attention_op_test_helper.h index 0e2241e23e..aa2a371cc9 100644 --- a/onnxruntime/test/contrib_ops/attention_op_test_helper.h +++ b/onnxruntime/test/contrib_ops/attention_op_test_helper.h @@ -43,7 +43,7 @@ struct AttentionTestData { }; // Disable some tests in Windows since prefast build might crash with large test data. -#if !defined(_MSC_VER) || defined(USE_DML) +#if !defined(_MSC_VER) // Return packed weights and bias for input projection. void GetAttentionWeight(std::vector& weight_data, int elements = 64 * 3 * 64, int offset = 0, int step = 1); void GetAttentionBias(std::vector& bias_data, int elements = 3 * 64, int offset = 0, int step = 1); diff --git a/onnxruntime/test/contrib_ops/multihead_attention_op_test.cc b/onnxruntime/test/contrib_ops/multihead_attention_op_test.cc index 5cd42e815f..fc7eafd714 100644 --- a/onnxruntime/test/contrib_ops/multihead_attention_op_test.cc +++ b/onnxruntime/test/contrib_ops/multihead_attention_op_test.cc @@ -452,7 +452,8 @@ static void RunMultiHeadAttentionTests(AttentionTestData& data, bool disable_cpu } } -#if !defined(_MSC_VER) || defined(USE_DML) +// Disable some tests in Windows since prefast build might crash with large test data. +#if !defined(_MSC_VER) // Test fused cross attention kernel // It requires head_size > 32 and head_size <= 64 for T4 GPU; hidden_size == v_hidden_size. TEST(MultiHeadAttentionTest, CrossAttention_Batch2_HeadSize40) {