-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels