Skip to content

Instantly share code, notes, and snippets.

Ryohei Tokuda nomaddo

  • Idein
  • Japan
Block or report user

Report or block nomaddo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9abfc2e7afd9634e7d9af00c0be28822
Platform: AMD Accelerated Parallel Processing\0
Device: gfx902\0
Driver version : 2639.3 (PAL,HSAIL)\0 (Linux x64)
Compute units : 10
Clock frequency : 1300 MHz
Global memory bandwidth (GBPS)
float : 31.79
float2 : 33.02
float4 : 33.92
@nomaddo
nomaddo / test.py
Last active Sep 15, 2018
TMU load experiment
View test.py
import numpy as np
import time
from videocore.assembler import qpu
from videocore.driver import Driver
@qpu
def hello_world(asm):
mov(r0, uniform)
ldi(r2, 3000000)
View phi.ll
/* clang-6 -O1 -S -emit-llvm
extern int f(int);
int g(int in)
{
int x = 0;
switch(in)
{
case 0:
x += f(in);
@nomaddo
nomaddo / hello.cl
Created Aug 30, 2018
opencl example
View hello.cl
__global void hello(__global float * a, float b)
{
int gid = get_global_id(0);
a[gid] = b;
}
View loop_interchange.cpp
/* ラズパイ3で実験する(オーバークロックなし)
* gcc 6.3 -O2でコンパイル(キャッシュの効果を実感するためだけなので他のループ最適化オプションはなし)
* -DCHANGE つきで780 millisec
* -DCHANGE なしで21850 millisec
*/
#include <iostream>
#include <vector>
#include <chrono>
View Debug.g4
grammar Debug;
prog returns [v]
: additive {$v = additive.v};
additive returns [v] :
l=additive s='+' r=primary {$v = $l.v + $r.v
print($v)}
| p=primary {$v = $p.v}
;
View .screenrc
escape ^Tt
defbce on
term xterm-256color
shell $SHELL
termcapinfo xterm* 'Co#256:pa#32767:AB=\E[48;5;%dm:AF=\E[38;5;%dm:'
hardstatus off
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W} %c %{g}]'
startup_message off
@nomaddo
nomaddo / bad.cpp
Last active Apr 19, 2018
これはどうすればいいの、、、、
View bad.cpp
#include <memory>
class A : public std::enable_shared_from_this<A> {
public:
int id;
A(int x) : id(x) {}
};
class B : public A
{
@nomaddo
nomaddo / backproweights.cl.s
Created Mar 28, 2018
The output of backproweights.cl
View backproweights.cl.s
// Module with 1 kernels, global data with 0 words (64-bit each), starting at offset 1 words and 0 words of stack-frame
// Kernel 'backprop_floats' with 2305 instructions, offset 2, with following parameters: float learningRateMultiplier (4 B, 1 items), int batchSize (4 B, 1 items), __global const float* gradOutput (4 B, 1 items), __global const float* images (4 B, 1 items), __global out float* gradWeights (4 B, 1 items) (lSize, lids, gidX, offX)
// label: %start_of_function
or r1, unif, unif
or ra1, unif, unif
or r0, unif, unif
or r2, unif, unif
or ra14, unif, unif
or ra13, unif, unif
or ra12, unif, unif
@nomaddo
nomaddo / default.s
Created Mar 27, 2018
BackpropWeightsScratchLarge.cl.s (optimized)
View default.s
// Module with 1 kernels, global data with 0 words (64-bit each), starting at offset 1 words and 0 words of stack-frame
// Kernel 'backprop_floats_withscratch_dobias_striped' with 2502 instructions, offset 2, with following parameters: float learningRateMultiplier (4 B, 1 items), int batchSize (4 B, 1 items), __global const float* gradOutput (4 B, 1 items), __global const float* images (4 B, 1 items), __global out float* gradWeights (4 B, 1 items), __local out float* _errorStripe (4 B, 1 items), __local out float* _imageStripe (4 B, 1 items) (lSize, lids, gidX)
// label: %start_of_function
or rb13, unif, unif
or rb21, unif, unif
or r2, unif, unif
or rb11, unif, unif
or rb12, unif, unif
or rb7, unif, unif
or rb8, unif, unif
You can’t perform that action at this time.