Skip to content

Instantly share code, notes, and snippets.

View nkreeger's full-sized avatar

Nick Kreeger nkreeger

  • Minneapolis / St. Paul, MN
View GitHub Profile
@nkreeger
nkreeger / build-pytorch.bat
Last active October 1, 2021 22:00
build-pytorch.bat
::set DEBUG=1
set REL_WITH_DEB_INFO=1
::set CMAKE_VERBOSE_MAKEFILE=1
set "CMAKE_INCLUDE_PATH=%cd%\mkl\include"
set "LIB=%cd%\mkl\lib;%LIB%"
set "LIB="C:\Python\Python39\libs";%LIB%"
set "LIB="C:\Python\Python39\Library\bin";%LIB%"
set DISTUTILS_USE_SDK=1
#include <algorithm>
#include <cassert>
#include <chrono>
#include <random>
#include <vector>
#include "cc_benchmarks.h"
void gen_rand(std::vector<int32_t>& v, size_t length) {
std::random_device rd;
std::mt19937 gen(rd());
@nkreeger
nkreeger / vimrc
Last active December 21, 2021 12:46
syntax enable set nocompatible " be iMproved, required filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@nkreeger
nkreeger / tmux.conf
Last active November 24, 2020 02:33
set-option -g default-shell /bin/zsh
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color*:Tc"
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
import numpy as np
import tensorflow as tf
# Sample 2x FC (dense) model
model = tf.keras.models.Sequential()
model.add(tf.keras.layers.Dense(48, input_shape=(16,)))
model.add(tf.keras.layers.Dense(48))
model.add(tf.keras.layers.Softmax())
model.compile(
optimizer='adam',
diff --git a/src/libANGLE/Framebuffer.cpp b/src/libANGLE/Framebuffer.cpp
index f3f9bfc36..482d0c396 100644
--- a/src/libANGLE/Framebuffer.cpp
+++ b/src/libANGLE/Framebuffer.cpp
@@ -73,7 +73,9 @@ bool CheckAttachmentCompleteness(const Context *context, const FramebufferAttach
if (!attachment.isRenderable(context))
{
- return false;
+ // TODO(kreeger): Actually fix this at some point.
const gles = require('node-gles');
const gl = gles.binding.createWebGLRenderingContext();
const ext = gl.getExtension('OES_texture_half_float');
gl.getExtension('EXT_color_buffer_half_float');
console.log('VERSION: ' + gl.getParameter(gl.VERSION));
gl.disable(gl.DEPTH_TEST);

Easy build/configure/comile/usage of Mesa on Ubuntu Bionic (18.04)

Build prereqs:

Enable 'Source Code' from "Software & Updates" app or manually on sources.d.

Next, run the following:

sudo apt-get build-dep mesa
sudo apt install libxrandr-dev meson
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 6cb5a14f5b0..2be26d18f0d 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -353,6 +353,10 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_MAX_VARYINGS:
return sws->have_vgpu10 ? VGPU10_MAX_FS_INPUTS : 10;
+ case PIPE_CAP_TEXTURE_FLOAT_LINEAR:
+ case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=/rootnfs modules_install
cp /rpiboot/$KERNEL.img /rpiboot/$KERNEL-backup.img
cp arch/arm/boot/zImage /rpiboot/$KERNEL.img
cp arch/arm/boot/dts/*.dtb /rpiboot/
cp arch/arm/boot/dts/overlays/*.dtb* /rpiboot/overlays/
cp arch/arm/boot/dts/overlays/README /rpiboot/overlays/