MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / check_marker

Method check_marker

test/tensorrt/tensorrt_test_base.py:343–357  ·  view source on GitHub ↗
(self, expected_result)

Source from the content-addressed store, hash-verified

341 )
342
343 def check_marker(self, expected_result):
344 paddle.framework.set_flags({"FLAGS_trt_min_group_size": 1})
345 with paddle.pir_utils.IrGuard():
346 main_program, startup_program, fetch_list = (
347 self.create_fake_program()
348 )
349 main_program = run_pir_pass(
350 main_program,
351 disable_passes=self.disable_passes,
352 )
353 marker_result = False
354 for op in main_program.global_block().ops:
355 if op.name() == self.target_marker_op:
356 marker_result = op.attrs().get("__l_trt__", False)
357 self.assertEqual(marker_result, expected_result)

Callers 15

test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80
test_trt_resultMethod · 0.80

Calls 7

create_fake_programMethod · 0.95
run_pir_passFunction · 0.90
global_blockMethod · 0.80
set_flagsMethod · 0.45
nameMethod · 0.45
getMethod · 0.45
attrsMethod · 0.45

Tested by

no test coverage detected