Skip to content

Instantly share code, notes, and snippets.

Avatar

N.Nakasato dadeba

  • University of Aizu
  • Japan
View GitHub Profile
View iv1
.file "/tmp/76fcbc6b-121e-49d2-8e48-1bf1268bc978.TMP"
.text
.globl grav3
.align 16, 0x90
.type grav3,@function
grav3: # @grav3
.Ltmp3:
.cfi_startproc
# BB#0: # %entry
pushq %rbp
View sb1
.file "/tmp/7e04f41d-6a01-45b6-b3ce-d4c2404bd6dd.TMP"
.text
.globl _Z12native_rsqrtDv8_f
.align 16, 0x90
.type _Z12native_rsqrtDv8_f,@function
_Z12native_rsqrtDv8_f: # @_Z12native_rsqrtDv8_f
# BB#0:
vrsqrtps YMM0, YMM0
ret
.Ltmp0:
@dadeba
dadeba / gist:a3fa8d35cf8bf1aaa01b
Created July 18, 2014 09:55
CLInfo log for Beignet 0.9.2
View gist:a3fa8d35cf8bf1aaa01b
iris[~] CLInfo [18:54]
Number of platforms: 1
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 1.2 beignet 0.9.2
Platform Name: Intel Gen OCL Driver
Platform Vendor: Intel
Platform Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd
Platform Name: Intel Gen OCL Driver
@dadeba
dadeba / error
Created July 18, 2014 11:57
errors in dmesg when running a benchmark on Beignet 0.9.2
View error
[13369.005426] [drm] stuck on render ring
[13369.005430] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[13369.005431] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[13369.005431] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[13369.005432] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[13369.005433] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[13369.007876] [drm:i915_set_reset_status] *ERROR* render ring hung inside bo (0x13561000 ctx 1) at 0x13561100
[13377.990180] [drm] stuck on render ring
[13377.990235] [drm:i915_set_reset_status] *ERROR* render ring hung inside bo (0x13581000 ctx 1) at 0x13581100
[13377.990237] [drm:i915_context_is_banned] *ERROR* context hanging too fast, declaring banned!
View sample my_fp kernel
__kernel void templateKernel(
__global uint8* xx,
__global uint8* yy,
__global uint8* zz,
__global uint8* ww,
__global uint8* res,
const int n_loop
)
{
uint tid = get_global_id(0);
@dadeba
dadeba / wav.jl
Last active August 29, 2015 14:07
View wav.jl
const hz = 44100 :: Int64
function save_wav_file(fn::String, wav_array::Vector)
len = length(wav_array)
pcm = uint16(1);
channel = uint16(1);
bit_s = uint16(16);
byte_s = uint16(bit_s/8 * channel);
samp_ps = uint32(hz);
View socks_proxy.sh
#!/bin/bash
disable_proxy()
{
sudo networksetup -setsocksfirewallproxystate Wi-Fi off
echo "SOCKS proxy disabled."
}
trap disable_proxy INT
sudo networksetup -setsocksfirewallproxy Wi-Fi localhost 8888
sudo networksetup -setsocksfirewallproxystate Wi-Fi on
View gist:66bd06948edc7d452731
__kernel void templateKernel(__global unsigned int * output,
__global unsigned int * input,
const unsigned int multiplier)
{
uint tid = get_global_id(0);
output[tid] = input[tid] * multiplier;
}
View gist:8e327c4eb4309ec96a5e
#define READONLY_P const * restrict
__kernel
void
grav1(
__global float4 READONLY_P x,
__global float4 READONLY_P y,
__global float4 READONLY_P z,
__global float4 READONLY_P m,
__global float4 *ax,
__global float4 *ay,
@dadeba
dadeba / FPMUL.scala
Last active August 29, 2015 14:08
parameterized FPMUL in Chsel
View FPMUL.scala
trait FPBASE {
val nbit = 32
val nman = 23
val nexp = nbit-nman-1
def mask(x:Int):UInt = UInt((0x1 << x) - 0x1)
def check_zero(x:UInt):Bool = (x === UInt(0))
def man(x:UInt):UInt = mask(nman+1) & (x | UInt(0x1 << nman))
def sign(x:UInt):UInt = x(nbit-1)
def exp(x:UInt):UInt = x(nbit-2,nbit-nexp-1)
def extract(x:UInt): (UInt, UInt, UInt) = (sign(x), exp(x), man(x))