Skip to content

Instantly share code, notes, and snippets.

@JeongHyunho
JeongHyunho / non_uniform_grid_indexing.py
Last active July 21, 2022 03:35
Non-uniform grid indexing benchmark
from torch.utils import benchmark
import numpy as np
h0 = 0.1 # 1st round grid h
h1 = 0.01 # 2nd round grid h
Bq = 100 # query batch size
results = []
rng = [0., 10.]