File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
python/paddle/geometric/sampling Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1515from paddle import _C_ops , _legacy_C_ops
1616from paddle .base .data_feeder import check_variable_and_dtype
1717from paddle .base .layer_helper import LayerHelper
18- from paddle .framework import in_dynamic_mode
18+ from paddle .framework import in_dynamic_mode , in_dynamic_or_pir_mode
1919
2020__all__ = []
2121
@@ -251,7 +251,7 @@ def weighted_sample_neighbors(
251251 "`eids` should not be None if `return_eids` is True."
252252 )
253253
254- if in_dynamic_mode ():
254+ if in_dynamic_or_pir_mode ():
255255 (
256256 out_neighbors ,
257257 out_count ,
Original file line number Diff line number Diff line change 1717import numpy as np
1818
1919import paddle
20+ from paddle .pir_utils import test_with_pir_api
2021
2122
2223class TestWeightedSampleNeighbors (unittest .TestCase ):
@@ -80,6 +81,7 @@ def test_sample_result(self):
8081 )
8182 self .assertTrue (np .sum (in_neighbors ) == in_neighbors .shape [0 ])
8283
84+ @test_with_pir_api
8385 def test_sample_result_static (self ):
8486 paddle .enable_static ()
8587 with paddle .static .program_guard (paddle .static .Program ()):
You can’t perform that action at this time.
0 commit comments