Skip to content

Instantly share code, notes, and snippets.

View davidberard98's full-sized avatar

David Berard davidberard98

  • Facebook
  • Menlo Park, CA
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body, html
{
padding:0;
margin:0;
width:100%;
height:100%;
<!DOCTYPE html PUBLIC>
<html>
<head>
<style>
body
{
background-color:#4400AA;
color:white;
}
div.contain
@davidberard98
davidberard98 / fluxbbresize.php
Last active August 29, 2015 14:25
Resize fluxBB profile avatars to allow uploading large files.
<?php
/*******************************
* copyright 2015 David Berard
* In profile.php, find the place dealing with $action=='upload_avatar' || $action=='upload_avatar2'
* Near the end of the file it writes the image to file.
* Once writing to file, use these functions to resize, eg.
* gl_resize('/path/to/file', '/path/to/file', '.jpg or .png or .gif')
* Also remember to allow large files in administrator settings and large dimensions.
*
* Must have PHP GD enabled/installed.
@davidberard98
davidberard98 / demo.sh
Created July 16, 2019 05:30
atop fails while generating parseables when reading from a pipe
#!/bin/bash
# demo.sh: demonstrate read() issue
# Usage: bash demo.sh [atop binary path] [atop log path]
#
# What it does:
# - write and compile demo.c
# - makes a named pipe
# - starts a process for demo.c, which writes small chunks to the pipe periodically.
# - runs atop -r [pipe] -P cpu
@davidberard98
davidberard98 / nvfuser-opinfo.txt
Last active January 14, 2022 21:41
nvfuser opinfo test failures
srun: job 15710 queued and waiting for resources
srun: job 15710 has been allocated resources
srun: error: ioctl(TIOCGWINSZ): Inappropriate ioctl for device
srun: error: Not using a pseudo-terminal, disregarding --pty option
monkeytype is not installed. Skipping tests for Profile-Directed Typing
test_nvfuser_correctness_H_cuda_complex64 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_float32 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_T_cuda_complex64 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_T_cuda_float32 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness___getitem___cuda_complex64 (__main__.TestCudaFuserOpInfoCUDA) ... ERROR
@davidberard98
davidberard98 / linalg_multi_dot.py
Last active January 25, 2022 22:36
pytorch uninitialized memory return values
import torch
from torch import tensor
for i in [0, 5]:
a = tensor([[-4, 3, 9, 7, 0, -6, 4, 0, -3, 2],
[-9, -7, -7, -2, 8, 4, -4, -4, -4, 4],
[-6, 8, -4, 5, -7, 5, -2, 9, -7, -1],
[-4, 4, -3, -1, 0, 2, 4, 6, -7, -1],
[-3, 5, -9, 4, -7, -9, -1, 2, -7, -6]], dtype=torch.long)
@davidberard98
davidberard98 / with_epsilon.txt
Last active January 26, 2022 00:22
mvlgamma input > (p-1)/2 requirement
$ python3 ../../pytorch/test/test_jit_fuser_te.py -k test_nnc_correctness_mv -v
CUDA not available, skipping tests
monkeytype is not installed. Skipping tests for Profile-Directed Typing
test_nnc_correctness_mv_cpu_bfloat16 (__main__.TestNNCOpInfoCPU) ... ok
test_nnc_correctness_mv_cpu_complex128 (__main__.TestNNCOpInfoCPU) ... ok
test_nnc_correctness_mv_cpu_complex64 (__main__.TestNNCOpInfoCPU) ... ok
test_nnc_correctness_mv_cpu_float32 (__main__.TestNNCOpInfoCPU) ... ok
test_nnc_correctness_mv_cpu_float64 (__main__.TestNNCOpInfoCPU) ... ok
test_nnc_correctness_mv_cpu_int16 (__main__.TestNNCOpInfoCPU) ... ok
test_nnc_correctness_mv_cpu_int32 (__main__.TestNNCOpInfoCPU) ... ok
@davidberard98
davidberard98 / nvfuser-opinfo.txt
Last active February 5, 2022 01:51
nvfuser opinfo tests - results feb 4, 2022
This file has been truncated, but you can view the full file.
srun: job 21182 queued and waiting for resources
srun: job 21182 has been allocated resources
srun: error: ioctl(TIOCGWINSZ): Inappropriate ioctl for device
srun: error: Not using a pseudo-terminal, disregarding --pty option
monkeytype is not installed. Skipping tests for Profile-Directed Typing
test_nvfuser_correctness_H_cuda_bfloat16 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_bool (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_complex128 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_complex64 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_float16 (__main__.TestCudaFuserOpInfoCUDA) ... ok
@davidberard98
davidberard98 / nvfuser-opinfo-rebased.txt
Last active February 7, 2022 16:14
feb 4, 2022: nvfuser opinfo tests rebased on https://github.com/pytorch/pytorch/pull/72127
This file has been truncated, but you can view the full file.
srun: job 21221 queued and waiting for resources
srun: job 21221 has been allocated resources
srun: error: ioctl(TIOCGWINSZ): Inappropriate ioctl for device
srun: error: Not using a pseudo-terminal, disregarding --pty option
monkeytype is not installed. Skipping tests for Profile-Directed Typing
test_nvfuser_correctness_H_cuda_bfloat16 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_bool (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_complex128 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_complex64 (__main__.TestCudaFuserOpInfoCUDA) ... ok
test_nvfuser_correctness_H_cuda_float16 (__main__.TestCudaFuserOpInfoCUDA) ... ok
@davidberard98
davidberard98 / eval_perf.csv
Last active February 23, 2022 17:57
Failures from torchbench + nvfuser
model default gpu time default cpu time default wall time nvfuser gpu time nvfuser cpu time nvfuser wall time
BERT_pytorch 129.053 83.838 129.193 127.947 83.956 128.093
Super_SloMo 1723.582 1344.799 1723.634 4159.717 3643.625 4159.733
alexnet 6.342 1.849 6.394 6.364 1.951 6.424
dcgan 27.126 3.318 27.175 26.033 3.363 26.086
demucs 369.007 24.469 369.072 370.552 24.257 370.600
mnasnet1_0 33.424 12.444 33.475 33.517 12.585 33.581
mobilenet_v2 18.324 13.989 18.378 20.660 20.441 20.711
mobilenet_v3_large 32.164 17.507 32.219 32.162 23.343 32.221
moco 408.424 408.413 408.478 397.519 397.497 397.578