Skip to content

Instantly share code, notes, and snippets.

View dexhunter's full-sized avatar
💭
I may be slow to respond.

Dixing (Dex) Xu dexhunter

💭
I may be slow to respond.
View GitHub Profile
@dexhunter
dexhunter / 10g-nccl-fast.json
Last active July 1, 2021 07:42
horovod timeline json
[
{"name": "process_name", "ph": "M", "pid": 0, "args": {"start_time_since_epoch_in_micros":1624937181806323}},
{"name": "process_sort_index", "ph": "M", "pid": 0, "args": {"sort_index": 0}},
{"name": "process_name", "ph": "M", "pid": 1, "args": {"name": "allreduce.noname.1"}},
{"name": "process_sort_index", "ph": "M", "pid": 1, "args": {"sort_index": 1}},
{"ph": "B", "name": "NEGOTIATE_ALLREDUCE", "ts": 3399382, "pid": 1},{"ph": "X", "name": "8", "ts": 3399384, "pid": 1, "dur": 0},{"ph": "X", "name": "9", "ts": 3399390, "pid": 1, "dur": 0},{"ph": "X", "name": "10", "ts": 3399392, "pid": 1, "dur": 0},{"ph": "X", "name": "11", "ts": 3399393, "pid": 1, "dur": 0},{"ph": "X", "name": "5", "ts": 7133998, "pid": 1, "dur": 0},{"ph": "X", "name": "4", "ts": 7207126, "pid": 1, "dur": 0},{"ph": "X", "name": "15", "ts": 7239969, "pid": 1, "dur": 0},{"ph": "X", "name": "7", "ts": 7248450, "pid": 1, "dur": 0},{"ph": "X", "name": "6", "ts": 7255862, "pid": 1, "dur": 0},{"ph": "X", "name": "13", "ts": 7283415, "pid": 1, "du
@dexhunter
dexhunter / 2dmesh.cc
Last active June 14, 2021 15:17
2d mesh algorithm in horovod (based on NCCLHierarchicalAllreduce)
#if HAVE_MPI
Status
NCCL2DMesh::Execute(std::vector<TensorTableEntry>& entries,
const Response& response) {
auto& first_entry = entries[0];
// Determine GPU IDs of the devices participating in this communicator.
std::vector<int32_t> nccl_device_map;
nccl_device_map.reserve(
global_state_->controller->GetLocalCommRanks().size());
public interface FitnessCustomer {
private static enum Level {
BRONZE, SILVER, GOLD
}
private Level level;
public void setLevel(Level level) {
this.level = level;
}
public Level getLevel() {
return this.level;
@dexhunter
dexhunter / daemon.json
Created February 24, 2020 08:37
public /etc/docker/daemon.json
{
"registry-mirrors" : [
"http://registry.docker-cn.com",
"http://docker.mirrors.ustc.edu.cn",
"http://hub-mirror.c.163.com",
"http://ovfftd6p.mirror.aliyuncs.com"
],
"insecure-registries" : [
"registry.docker-cn.com",
"docker.mirrors.ustc.edu.cn"
@dexhunter
dexhunter / hosts-github-cn
Created February 9, 2020 22:20
Github hosts for China
192.30.253.112 github.com
192.30.253.113 github.com
192.30.253.119 gist.github.com
151.101.185.194 github.global.ssl.fastly.net
151.101.100.133 assets-cdn.github.com
151.101.100.133 raw.githubusercontent.com
@dexhunter
dexhunter / docker-compose-simple.yaml
Created February 9, 2020 13:01
config with counchdb
version: '2'
services:
orderer:
container_name: orderer
image: hyperledger/fabric-orderer
environment:
- FABRIC_LOGGING_SPEC=debug
- ORDERER_GENERAL_LISTENADDRESS=orderer
- ORDERER_GENERAL_BOOTSTRAPMETHOD=file
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
@dexhunter
dexhunter / gist-reveal.it-slides.html
Created November 12, 2018 14:55 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>
@dexhunter
dexhunter / sdk-py-tutorial.md
Last active September 4, 2018 07:18
fabric python sdk tutorial

Tutorial of using Fabric SDK

Notice: The tutorial is still in-progress, feel free to ask question in the rktchat channel. Code can be found at e2e_test.py.

Pre-requisites

Install Fabric SDK

@dexhunter
dexhunter / introrx.md
Created June 17, 2018 08:09 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing