Skip to content

Instantly share code, notes, and snippets.

View jacobkahn's full-sized avatar

Jacob Kahn jacobkahn

View GitHub Profile
diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt
index 08b4c486..7f32e9b8 100644
--- a/bindings/python/CMakeLists.txt
+++ b/bindings/python/CMakeLists.txt
@@ -21,7 +21,7 @@ function (add_pybind11_extension ext_name)
target_link_libraries(
${ext_name}
PUBLIC
- fl_lib_audio
+ # fl_lib_audio
@jacobkahn
jacobkahn / cast.new.jit.kernel.cl
Created October 28, 2020 01:12
ArrayFire JIT kernel Generated from AF_JIT_KERNEL_TRACE=stderr ./test/cast_opencl --gtest_filter="*Test_JIT_DuplicateCastNoop"
__kernel void
KER9041217350160086296(
__global float *in0, dim_t iInfo0_offset,
__global float *out0,
KParam oInfo, uint groups_0, uint groups_1, uint num_odims)
{
uint groupId = get_group_id(1) * get_num_groups(0) + get_group_id(0);
uint threadId = get_local_id(0);
@jacobkahn
jacobkahn / cast.jit.kernel.master.cu
Last active October 28, 2020 01:11
ArrayFire JIT kernel Generated from AF_JIT_KERNEL_TRACE=stderr ./test/cast_cuda --gtest_filter="*Test_JIT_DuplicateCastNoop" [old master]
typedef unsigned int uint;
typedef long long dim_t;
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
@jacobkahn
jacobkahn / cast.new.jit.kernel.cu
Last active October 28, 2020 01:11
ArrayFire JIT kernel Generated from AF_JIT_KERNEL_TRACE=stderr ./test/cast_cuda --gtest_filter="*Test_JIT_DuplicateCastNoop"
typedef unsigned int uint;
typedef long long dim_t;
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
@jacobkahn
jacobkahn / librispeech.train.manual.excluded.titles.lst
Created April 7, 2020 02:03
List of LibriSpeech train books found in Gutenberg with fuzzy matching procedure (word-level Levenshtein, score = 0.3, distancesim = 0.75)
100 the story of a patriot|100 the story of a patriot|0
32 caliber|32 caliber|0
a birding on a bronco|a birding on a bronco|0
acres of diamonds|acres of diamonds|0
buccaneers and pirates of our coasts|buccaneers and pirates of our coasts|0
byways around san francisco bay|byways around san francisco bay|0
caleb williams or things as they are|caleb williams or things as they are|0
candide|candide|0
candide|candide|0
canyons of the colorado|canyons of the colorado|0
@jacobkahn
jacobkahn / gutenberg_minus_librilight.manual.excluded.titles.lst
Last active April 6, 2020 20:49
List of LibriLight books found in Gutenberg with fuzzy matching procedure (word-level Levenshtein, score = 0.3, distancesim = 0.75)
100 the story of a patriot|100 the story of a patriot|0
1914 and other poems|1914 and other poems|0
32 caliber|32 caliber|0
35 sonnets|35 sonnets|0
813|813|0
aaron's rod|aaron's rod|0
abaft the funnel|abaft the funnel|0
abandoned|abandoned|0
abbotsford and newstead abbey|abbotsford and newstead abbey|0
abe and mawruss being further adventures of potash and perlmutter|abe and mawruss being further adventures of potash and perlmutter|0
@jacobkahn
jacobkahn / arrayfire.2801.changes.diff
Last active March 23, 2020 14:14
Updated changes for ArrayFire PR #2801
diff --git a/src/backend/common/DefaultMemoryManager.cpp b/src/backend/common/DefaultMemoryManager.cpp
index f3921a6b..0b1e44ca 100644
--- a/src/backend/common/DefaultMemoryManager.cpp
+++ b/src/backend/common/DefaultMemoryManager.cpp
@@ -162,7 +162,8 @@ void* DefaultMemoryManager::alloc(bool user_lock, const unsigned ndims,
if (!this->debug_mode) {
// FIXME: Add better checks for garbage collection
// Perhaps look at total memory available as a metric
- if (getMemoryPressure() > getMemoryPressureThreshold()) {
+ if (current.lock_bytes >= current.max_bytes ||
@jacobkahn
jacobkahn / test_many.sh
Last active February 29, 2020 05:51
Run some stuff a bunch of times and see if it prints FAIL anywhere
#!/bin/sh
# Usage:
# bash ./test_many.sh [test_name] [num_runs=100] [parallelism=32]
#
# Example:
# bash ./test_many.sh 2B
test_name=$1
num_runs="${2:-100}"
@jacobkahn
jacobkahn / librispeech_lm_corpus.librivox.manual.excluded.titles.lst
Last active January 19, 2020 03:08
List of LibriSpeech LM corpus books found in LibriVox with fuzzy matching procedure (word-level Levenshtein, score = 0.3, distancesim = 0.75)
mermaid of druid lake and other stories|the mermaid of druid lake and other stories|1
merry adventures of robin hood|the merry adventures of robin hood|1
middle of things|the middle of things|1
mill on the floss|the mill on the floss|1
mind that found itself an autobiography|a mind that found itself an autobiography|1
miscellany of men|a miscellany of men|1
money moon a romance|the money moon a romance|1
monk and the hangman's daughter|the monk and the hangman's daughter|1
monk a romance|the monk a romance|1
moon and sixpence|the moon and sixpence|1
@jacobkahn
jacobkahn / unsubscribe-v2.js
Created January 18, 2020 17:59
Unsubscribe from Repositories in an Org v2
function unwatchOrgRepos(orgName, repoNameFirstFourChars) {
var titleString = orgName + "/" + repoNameFirstFourChars;
var repoItems = document.querySelectorAll(".Box-row")
repoItems.forEach(function (item) {
var repoOrgElement = item.querySelector("a");
if (repoOrgElement && repoOrgElement.innerText.includes(titleString)) {
item.querySelector('.float-right').querySelector('button[value=ignore]').click()
console.log("Unwatched " + repoOrgElement.innerText);
}
});