Skip to content

Instantly share code, notes, and snippets.

View back2yes's full-sized avatar
🎯
Focusing

back2yes

🎯
Focusing
View GitHub Profile
[ 61%] Building CXX object src/aten/CMakeFiles/tc_aten.dir/aten_compiler.cc.o
[ 62%] Building CXX object test/CMakeFiles/test_mapper.dir/test_mapper.cc.o
[ 63%] Built target mapping_options
[ 64%] Built target test_isl_functionality
[ 65%] Built target test_inference
In file included from /home/x/TensorComprehensions/src/../include/tc/core/utils/dlpack.h:86:0,
from /home/x/TensorComprehensions/src/../include/tc/core/halide2pencil.h:25,
from /home/x/TensorComprehensions/src/../include/tc/core/tc_executor.h:18,
from /home/x/TensorComprehensions/src/../include/tc/core/execution_engine.h:26,
from /home/x/TensorComprehensions/src/../include/tc/aten/aten_compiler.h:25,
size of input_small: torch.Size([10, 1, 20, 20])
Variable containing:
(0 ,0 ,.,.) =
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
... ⋱ ...
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
size of input: torch.Size([1, 4, 8, 8])
input:
(0 ,0 ,.,.) =
0.8782 -0.8192 -0.9739 -0.3594 -0.2563 0.1029 -1.8487 -0.3550
0.3321 0.0943 -0.3745 -0.6876 -0.0085 2.5286 2.0220 -0.5226
-1.3020 0.2146 0.5424 0.1033 2.4845 0.3598 1.5213 -0.1765
-0.6228 1.2918 0.3838 -1.2308 1.9327 0.1885 -0.3766 -0.0046
-0.3527 -0.7072 0.7443 -1.0632 -0.0488 0.7710 1.0156 -2.0560
0.3643 -0.0037 -0.9849 -0.3245 -0.0614 -0.4680 0.4322 -2.1684
-0.9470 -0.7947 1.5997 -0.5201 -0.4490 -0.5583 0.0956 -0.4794
@back2yes
back2yes / lc.py
Created March 27, 2018 08:32 — forked from guillefix/lc.py
temporal workaround to get Conv2dLocal to work in PyTorch
# coding: utf-8
# In[1]:
import math
import torch
from torch.nn.parameter import Parameter
import torch.nn.functional as F
/home/x/TensorComprehensions
Build Type: Release
Building ALL
gflags found
glog found
PyTorch is installed, libATen.so will be used from there to avoid two copies
isl found
Successfully installed DLPACK
no files found
# Archive together all the halide and llvm object files
@back2yes
back2yes / drivertest.cpp
Created April 10, 2019 13:53 — forked from tautologico/drivertest.cpp
Vector addition example using CUDA driver API
/*
* drivertest.cpp
* Vector addition (host code)
*
* Andrei de A. Formiga, 2012-06-04
*/
#include <stdio.h>
#include <stdlib.h>
# This xorg configuration file will start a dummy X11 server.
# move it to /etc/X11/xorg.conf
# don't forget apt install xserver-xorg-video-dummy;
# based on https://xpra.org/Xdummy.html
Section "ServerFlags"
Option "DontVTSwitch" "true"
Option "AllowMouseOpenFail" "true"
Option "PciForceNone" "true"
Option "AutoEnableDevices" "false"
@back2yes
back2yes / Fleishman.py
Created February 3, 2022 17:29 — forked from zeimusu/Fleishman.py
Generate data with given mean, standard deviation, skew, and kurtosis. Intended for monte carlo simulations with non normal distributions
import numpy as np
from numpy.linalg import solve
import logging
logging.basicConfig(level = logging.DEBUG)
from scipy.stats import moment,norm
def fleishman(b, c, d):
"""calculate the variance, skew and kurtois of a Fleishman distribution
F = -c + bZ + cZ^2 + dZ^3, where Z ~ N(0,1)
"""
@back2yes
back2yes / Fleishman.py
Created February 3, 2022 17:45 — forked from paddymccrudden/Fleishman.py
Generate data with given mean, standard deviation, skew, and kurtosis. Intended for monte carlo simulations with non normal distributions
import numpy as np
from numpy.linalg import solve
import logging
logging.basicConfig(level = logging.DEBUG)
from scipy.stats import moment,norm
def fleishman(b, c, d):
"""calculate the variance, skew and kurtois of a Fleishman distribution
F = -c + bZ + cZ^2 + dZ^3, where Z ~ N(0,1)
"""
@back2yes
back2yes / seed_everything.py
Created February 13, 2022 13:43 — forked from ihoromi4/seed_everything.py
pytorch - set seed everything
def seed_everything(seed: int):
import random, os
import numpy as np
import torch
random.seed(seed)
os.environ['PYTHONHASHSEED'] = str(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)