File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,19 @@ class ProfilerETDumpTest : public ::testing::Test {
6161 free (buf);
6262 }
6363
64+ // Triggers ET_EXPECT_DEATH if log_intermediate_output_delegate has no
65+ // data sink
66+ void expect_log_intermediate_delegate_death (
67+ ETDumpGen* gen,
68+ TensorFactory<ScalarType::Float>& tf) {
69+ ET_EXPECT_DEATH (
70+ gen->log_intermediate_output_delegate (
71+ " test_event_tensor" ,
72+ static_cast <torch::executor::DebugHandle>(-1 ),
73+ tf.ones ({3 , 2 })),
74+ " Must set data sink before writing tensor-like data" );
75+ }
76+
6477 ETDumpGen* etdump_gen[2 ];
6578 uint8_t * buf = nullptr ;
6679 std::unique_ptr<TempFile> temp_file;
@@ -515,18 +528,6 @@ TEST_F(ProfilerETDumpTest, VerifyData) {
515528 }
516529}
517530
518- // Triggers ET_EXPECT_DEATH if log_intermediate_output_delegate has no data sink
519- static void expect_log_intermediate_delegate_death (
520- ETDumpGen* gen,
521- TensorFactory<ScalarType::Float>& tf) {
522- ET_EXPECT_DEATH (
523- gen->log_intermediate_output_delegate (
524- " test_event_tensor" ,
525- static_cast <torch::executor::DebugHandle>(-1 ),
526- tf.ones ({3 , 2 })),
527- " Must set data sink before writing tensor-like data" );
528- }
529-
530531TEST_F (ProfilerETDumpTest, LogDelegateIntermediateOutput) {
531532 const size_t debug_buf_size = 2048 ;
532533 const size_t etdump_buf_size = 512 * 1024 ;
You can’t perform that action at this time.
0 commit comments