Skip to content

Instantly share code, notes, and snippets.

View Roger-luo's full-sized avatar
🍭
casting spells

Xiu-zhe (Roger) Luo Roger-luo

🍭
casting spells
View GitHub Profile
@Roger-luo
Roger-luo / Vec256Complex.cpp
Created September 17, 2018 19:33
ATen/cpu/vec256/vec256_complex.h
#pragma once
#include "intrinsics.h"
#include "vec256_base.h"
#if defined(__AVX__) && !defined(_MSC_VER)
#include <sleef.h>
#endif
namespace at {
namespace vec256 {
@Roger-luo
Roger-luo / gist:b2e892ee710c6360a11a1b23d3686c64
Created August 9, 2018 10:16
PyPlot causes segment fault
Process: julia [1067]
Path: /Users/USER/*/julia
Identifier: julia
Version: 0
Code Type: X86-64 (Native)
Parent Process: zsh [762]
Responsible: julia [1067]
User ID: 501
Date/Time: 2018-08-09 18:14:17.173 +0800
@Roger-luo
Roger-luo / Register.jl
Created May 13, 2018 12:14
A naive quanutm register
#################
# Utils
#################
"""
log2i(x)
logrithm for integer pow of 2
"""
function log2i(x::T)::T where T
@Roger-luo
Roger-luo / rename.py
Last active January 10, 2018 09:26
change PyTorch generic type name to whatever you want
"""Convert generic type name (real) in PyTorch project
to whatever you want.
Author: Roger-luo
"""
import os
import re
import sys