File tree Expand file tree Collapse file tree 2 files changed +1
-8
lines changed
python/paddle/audio/functional Expand file tree Collapse file tree 2 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -493,7 +493,7 @@ def _apply_window_postprocess(
493493 raise RuntimeError (
494494 f"Pinning memory is not supported for { device } "
495495 )
496- w = paddle . to_tensor ( w , place = device )
496+ w = w . to ( device = device )
497497 if pin_memory and paddle .in_dynamic_mode ():
498498 w = w .pin_memory ()
499499 if requires_grad is True :
Original file line number Diff line number Diff line change 1818from paddle .audio .functional .window import get_window
1919
2020
21- def _has_cuda ():
22- return (
23- paddle .is_compiled_with_cuda () and "gpu" in paddle .device .get_device ()
24- )
25-
26-
2721class TestWindowFunctions (unittest .TestCase ):
2822 def setUp (self ):
2923 paddle .set_device ("cpu" )
@@ -67,7 +61,6 @@ def test_hamming_layout_warning(self):
6761 self .assertTrue (w .stop_gradient )
6862 self .assertEqual (list (w .shape ), [N ])
6963
70- @unittest .skipUnless (_has_cuda (), "GPU not available" )
7164 def test_hamming_device_gpu_pin_memory (self ):
7265 if paddle .is_compiled_with_cuda ():
7366 N = 12
You can’t perform that action at this time.
0 commit comments