Skip to content

Instantly share code, notes, and snippets.

@zou3519
zou3519 / bench.py
Last active June 12, 2018 12:21
[pytorch] GridSampler CUDNN vs THCUNN performance comparision script
import time
import torch
import torch.backends.cudnn as cudnn
import torch.nn.functional as F
from torch.autograd import Variable
def benchmark_shape(N, C, IH, IW, H, W, nrand, nrep):
"""