Skip to content

Instantly share code, notes, and snippets.

View oscarbg's full-sized avatar

Oscar Barenys oscarbg

View GitHub Profile
@oscarbg
oscarbg / int_mul.cu
Last active August 29, 2015 14:13 — forked from allanmac/int_mul.cu
// -*- compile-command: "nvcc -m 32 -arch sm_50 -Xptxas=-v,-abi=no -cubin int_mul.cu" ; -*-
#include <stdint.h>
//
//
//
#define KERNEL_QUALIFIERS __global__
#define KERNEL_QUALIFIERS_EXTERN extern KERNEL_QUALIFIERS
@oscarbg
oscarbg / gist:fac8a36539e82ab5f97e
Created January 17, 2015 15:12
Trying to access fp16x2 on Maxwell on CUDA 7.0
//goes well until ptxas which says something about invalid arguments so at least f16x2 modified atom instruction is recognized?
u32
atomf16x2(u32 a, u32 b)
{
u32 d;
asm("atom.global.add.f16x2 %0, [%1], %2;" : "=r"(d) : "r"(a), "r"(b));
//atom.global.add.u32 %r5, [%rd2], 10;
//asm("mul.wide.s16 %0, %1, %2;" : "=r"(d) : "h"(a), "h"(b));
@oscarbg
oscarbg / gist:3f787a30ac63fd73336c164d2729cae1
Created March 7, 2017 02:59 — forked from rejunity/gist:7bd0f1fa4a0014ef26c097225dc62fc0
Compile and run OpenSWR on AWS Instance (Ubuntu 14.04)
# Approximate recipe on compiling and running OpenSWR on AWS Instance (Ubuntu 14.04)
# Questions regarding this recipe: @__rej__
# http://openswr.org
# prerequisites
sudo apt-get update
sudo apt-get install git
sudo apt-get install build-essential
# Pre requisites
- Enable DRI3 as described in https://vulkan.lunarg.com/app/docs/v1.0.3.1/getting_started_linux
- Install a library for SHA, e.g. sudo apt-get install libgcrypt11-dev (if not already present)
- Otherwise the driver may throw an error with "_mesa_sha1_compute" when loading SPIR-V shaders
# Building
- Clone Mesa Master : git clone git://anongit.freedesktop.org/mesa/mesa -b Master
- cd mesa
- autoreconf -vfi
- ./configure --with-dri-drivers=i965 --with-gallium-drivers= --with-sha1= --with-vulkan-drivers=intel
@oscarbg
oscarbg / gist:97bf1f5a502d286de4e5fc96f17d3ddb
Created August 10, 2018 12:55
Simple *deprecated* WinML with MNIST ONNX digit detection..
#include <wrl/client.h>
#include <winml.h>
#include <stdio.h>
using Microsoft::WRL::ComPtr;
#include"cnpy.h"
#define PRINTDBG
int main(int argc,char**argv)
@oscarbg
oscarbg / gist:a5c0d474f9bac5b16e5d3dc7b2c8ae96
Created August 10, 2018 13:29
DirectML metacommands list in RS6 18204 and D3D12 metacommands API from WinSDK 17723
directml.dll metacommands found:
copytensor
reduce
gemm
pooling
roipooling
convolution
normalization
mvn
rnn
@oscarbg
oscarbg / gist:7421f89fc528aee69ce45aa5045d8649
Created November 28, 2018 07:56
Intel Iris drv glxinfo output
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
@oscarbg
oscarbg / gist:7405a2add1507ed930198b4a7eafee51
Created November 28, 2018 08:02
Intel "classic" Mesa drv glxinfo output
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
@oscarbg
oscarbg / ZinkANVIL.txt
Created November 28, 2018 08:34
Zink glxinfo outputs
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_no_error,
GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
@oscarbg
oscarbg / Talvos
Created November 28, 2018 09:45
Vulkan CPU driver vulkaninfo reports
==========
VULKANINFO
==========
Vulkan Instance Version: 1.1.82
WARNING: [Loader Message] Code 0 : loader_scanned_icd_add: Using deprecated ICD interface of 'vkGetInstanceProcAddr' instead of 'vk_icdGetInstanceProcAddr' for ICD talvos-vulkan.dll
Instance Extensions: