This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rapids-0.16 | |
channels: | |
- anaconda | |
- rapidsai | |
- nvidia | |
- conda-forge | |
- defaults | |
dependencies: | |
- _libgcc_mutex=0.1=conda_forge | |
- _openmp_mutex=4.5=1_gnu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch.autograd import Variable | |
import tensor_comprehensions as tc | |
use_cuda = torch.cuda.is_available() | |
dtype = torch.cuda.FloatTensor if use_cuda else torch.FloatTensor | |
# Straightforward convolution with a filter of size Xp = 2*X-1 | |
convolution_1D_lang = """ | |
def convolution_1D(float(X) A, float(Xp) K) -> (B) { |