Skip to content

Instantly share code, notes, and snippets.

View ClementPinard's full-sized avatar

Clément Pinard ClementPinard

View GitHub Profile
@ClementPinard
ClementPinard / bench.py
Created June 12, 2018 11:25 — forked from zou3519/bench.py
[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):
"""