Skip to content

Instantly share code, notes, and snippets.

View soumith's full-sized avatar

Soumith Chintala soumith

View GitHub Profile
@soumith
soumith / main.lua
Last active October 14, 2023 03:06
-- Torch Android demo script
-- Script: main.lua
-- Copyright (C) 2013 Soumith Chintala
require 'torch'
require 'cunn'
require 'nnx'
require 'dok'
require 'image'
import numpy as np
import os
import time
import warnings
import pickle
# from accimage import Image
from PIL import Image
import io
try:
@soumith
soumith / gist:01da3874bf014d8a8c53406c2b95d56b
Last active March 28, 2022 16:53
Install PillowSIMD+libjpeg-turbo on Conda
conda uninstall --force pillow -y
# install libjpeg-turbo to $HOME/turbojpeg
git clone https://github.com/libjpeg-turbo/libjpeg-turbo
pushd libjpeg-turbo
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/turbojpeg
make
make install
https://github.com/pytorch/pytorch/pull/3429 Allow empty index tensor for index_select
https://github.com/pytorch/pytorch/pull/3411 Clear out eigenvector tensor when eigenvector=F for symeig
https://github.com/pytorch/pytorch/pull/3127 adaptive pooling supports only specifying size in certain dimension
https://github.com/pytorch/pytorch/pull/6541 Fix regression that STFT has no backward.
https://github.com/pytorch/pytorch/pull/6517 More precise digamma
https://github.com/pytorch/pytorch/pull/6463 [pytorch] Fix signed random_
https://github.com/pytorch/pytorch/pull/6438 Fix reflection padding boundary checks
https://github.com/pytorch/pytorch/pull/6418 [pytorch] Fix clamp is missing kwarg out (#6028)
https://github.com/pytorch/pytorch/pull/6249 Add arg checks in torch.utils.data.Sampler classes
https://github.com/pytorch/pytorch/pull/6244 Fix SGD lr check failing on default value
@soumith
soumith / pytorch-agx-xavier.sh
Last active August 8, 2021 12:33
Install PyTorch on NVIDIA AGX Xavier using JetPack 4.1
sudo apt-get install -y libopenblas-dev cmake ninja-build
sudo apt-get install -y python-pip
sudo pip install virtualenv
virtualenv pytorch-env
. pytorch-env/bin/activate
git clone https://github.com/pytorch/pytorch --recursive
pip install -r requirements.txt
python setup.py install
import os
import threading
from flask import Flask
import socketio
from flask_cors import cross_origin, CORS
import dlevent
import logging
import json
import random
try:
version: 0.2.1
command: /home/bluebox/miniconda3/bin/ghstack
status: e01eae026 "use event dispatcher in dashboard and agents"
$ git remote get-url origin
Using selector: EpollSelector
git@github.com:fairinternal/minecraft.git
# POST https://api.github.com/graphql
Request GraphQL query:
Fatal Python error: Aborted
Thread 0x00007fdbce852700 (most recent call first):
File "/usr/lib/python3.6/http/client.py", line 368 in begin
File "/usr/lib/python3.6/http/client.py", line 1345 in getresponse
File "/usr/lib/python3.6/xmlrpc/client.py", line 1170 in single_request
File "/usr/lib/python3.6/xmlrpc/client.py", line 1154 in request
File "/usr/lib/python3.6/xmlrpc/client.py", line 1458 in __request
File "/usr/lib/python3.6/xmlrpc/client.py", line 1112 in __call__
File "/home/soumith/pyrobot_catkin_ws/src/ros_comm/clients/rospy/src/rospy/impl/tcpros_base.py", line 89 in _is_use_tcp_keepalive
Fatal Python error: Aborted
Thread 0x00007fde70f24700 (most recent call first):
File "/usr/lib/python3.6/http/client.py", line 1221 in putheader
File "/usr/lib/python3.6/xmlrpc/client.py", line 1309 in send_content
File "/usr/lib/python3.6/xmlrpc/client.py", line 1279 in send_request
File "/usr/lib/python3.6/xmlrpc/client.py", line 1166 in single_request
File "/usr/lib/python3.6/xmlrpc/client.py", line 1154 in request
File "/usr/lib/python3.6/xmlrpc/client.py", line 1452 in __request
File "/usr/lib/python3.6/xmlrpc/client.py", line 1112 in __call__
# *****************************************************************************
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.