Skip to content

Instantly share code, notes, and snippets.

View jeanfeydy's full-sized avatar

Jean Feydy jeanfeydy

View GitHub Profile
@jeanfeydy
jeanfeydy / environment.yml
Created March 8, 2021 15:25
An example of conda environment to run dMaSIF.
name: rapids-0.16
channels:
- anaconda
- rapidsai
- nvidia
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=1_gnu
@jeanfeydy
jeanfeydy / log_convolution_1D.py
Created March 21, 2018 13:20
Reproduces issue #174 in Tensor Comprehensions
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) {