@@ -115,8 +115,7 @@ function rfft_(input: Tensor): Tensor {
115
115
const zeros = input . zerosLike ( ) ;
116
116
const complexInput = complex ( input , zeros ) . as2D ( batch , innerDimensionSize ) ;
117
117
118
- const ret = ENV . engine . runKernel ( backend => backend . fft ( complexInput ) ,
119
- { complexInput} ) ;
118
+ const ret = fft ( complexInput ) ;
120
119
121
120
// Exclude complex conjugations. These conjugations are put symmetrically.
122
121
const half = Math . floor ( innerDimensionSize / 2 ) + 1 ;
@@ -156,8 +155,7 @@ function irfft_(input: Tensor): Tensor {
156
155
157
156
if ( innerDimensionSize <= 2 ) {
158
157
const complexInput = input . as2D ( batch , innerDimensionSize ) ;
159
- const ret = ENV . engine . runKernel (
160
- backend => backend . ifft ( complexInput ) , { complexInput} ) ;
158
+ const ret = ifft ( complexInput ) ;
161
159
return real ( ret ) ;
162
160
} else {
163
161
// The length of unique components of the DFT of a real-valued signal
@@ -176,8 +174,7 @@ function irfft_(input: Tensor): Tensor {
176
174
const r = realInput . concat ( realConjugate , 1 ) ;
177
175
const i = imagInput . concat ( imagConjugate , 1 ) ;
178
176
const complexInput = complex ( r , i ) . as2D ( outputShape [ 0 ] , outputShape [ 1 ] ) ;
179
- const ret = ENV . engine . runKernel (
180
- backend => backend . ifft ( complexInput ) , { complexInput} ) ;
177
+ const ret = ifft ( complexInput ) ;
181
178
return real ( ret ) ;
182
179
}
183
180
}
0 commit comments