You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, resample! is quite slow on the gpu. Optimizing code therefore requires designing a workflow in which data is resampled before being moved to the gpu so other preprocessing steps can enjoy the gpu speedup. This may not be ideal in all cases. The example below should demonstrate the issue.
# choose original fs and new fs
fs = 100.
resample_fs = 10.
# generate some 'data'
data = rand(500,500)
# resample on cpu
C = CorrData(corr=data,fs=fs)
cpu_time = @elapsed resample!(C,resample_fs)
# resample on gpu
C = CorrData(corr=data,fs=fs) |> gpu
gpu_time = @elapsed resample!(C,resample_fs)
# print results
print("CPU time: ", cpu_time, " s\n")
print("GPU time: ", gpu_time, " s\n")
CPU time: 0.029605658 s
GPU time: 108.995494081 s
The text was updated successfully, but these errors were encountered:
I'm a little surprised resample works on the GPU...I don't believe I wrote a version of resample specifically for the GPU, so I think there's some data transfer to/from CPU/GPU going on here that is gumming things up. The resample code just calls an FIR filter, which I do have for the GPU but is slow because it's using an FFT. All that's to say that, yes definitely can speed things up!
Should we close this since it's related to #107 (comment)? The performance elements of both issues are with SeisIO, not SeisNoise. One overall fix would be to implement resample for NodalData in SeisNoise, and to eventually add GPU support for resample in general.
At the moment, resample! is quite slow on the gpu. Optimizing code therefore requires designing a workflow in which data is resampled before being moved to the gpu so other preprocessing steps can enjoy the gpu speedup. This may not be ideal in all cases. The example below should demonstrate the issue.
The text was updated successfully, but these errors were encountered: