Skip to content

Instantly share code, notes, and snippets.

View staticfloat's full-sized avatar

Elliot Saba staticfloat

View GitHub Profile
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.4.198 Kernel Configuration
#
CONFIG_SUPPORT_OPENWRT=y
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
@staticfloat
staticfloat / environment_artifact_audit.jl
Created August 17, 2022 18:01
Audit script to print out which packages are using the most artifacts in an environment
using Pkg, Artifacts, TOML, Base.BinaryPlatforms, Printf
# First, collect the list of packages available in this environment
function collect_pkg_roots()
ctx = Pkg.Types.Context()
curr_proj_dir = dirname(Base.active_project())
pkg_roots = Dict{String,String}(
basename(curr_proj_dir) => curr_proj_dir,
)
for (_, pkg) in ctx.env.manifest.deps
$ lldb -- /Users/administrator/src/julia-releases/usr/bin/julia -C "apple-a12" --output-ji /Users/administrator/src/julia-releases/usr/lib/julia/corecompiler.ji.tmp --startup-file=no --warn-overwrite=yes -g0 -O0 compiler/compiler.jl
(lldb) target create "/Users/administrator/src/julia-releases/usr/bin/julia"
Current executable set to '/Users/administrator/src/julia-releases/usr/bin/julia' (arm64).
(lldb) settings set -- target.run-args "-C" "apple-a12" "--output-ji" "/Users/administrator/src/julia-releases/usr/lib/julia/corecompiler.ji.tmp" "--startup-file=no" "--warn-overwrite=yes" "-g0" "-O0" "compiler/compiler.jl"
(lldb) r
Process 40975 launched: '/Users/administrator/src/julia-releases/usr/bin/julia' (arm64)
Process 40975 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x1034000c0)
frame #0: 0x000000019f1c2860 libsystem_platform.dylib`sys_icache_invalidate + 52
libsystem_platform.dylib`sys_icache_invalidate:
$ julia-master --project --threads=auto flux_multithreaded_training.jl
[ Info: Warming up Flux.train!()
ERROR: LoadError: AssertionError: i == j
Stacktrace:
[1] _try_static
@ ~/.julia/packages/SimpleChains/mTIEp/src/simple_chain.jl:213 [inlined]
[2] _try_static
@ ~/.julia/packages/SimpleChains/mTIEp/src/simple_chain.jl:231 [inlined]
[3] maybe_static_size_arg
@ ~/.julia/packages/SimpleChains/mTIEp/src/simple_chain.jl:286 [inlined]
using Flux, Printf, Statistics
# Simple model
function gen_model()
return Chain(
Dense(8, 8, σ),
Dense(8, 8, σ),
Dense(8, 8, σ),
Dense(8, 1, σ),
)
@staticfloat
staticfloat / git-find-treehash.sh
Created November 4, 2021 23:13
Helper script to find a treehash in a git repository
#!/bin/bash
if [[ -z "$1" ]]; then
echo "Usage: git-find-treehash <treehash>" >&2
exit 1
fi
commits=$(git log --pretty='%H %T' $commithash | grep $1 | awk '{print $1}')
if [[ -n "${commits}" ]]; then
echo "Found at commits: $commits"
exit 0
@staticfloat
staticfloat / parse_dump.jl
Last active September 14, 2021 21:48
rr dump analyzer script
using UnicodePlots, Printf
# Dump file generated by `rr dump`
dump_file = ARGS[1]
if !isfile(dump_file)
error("Invalid dump file $(dump_file)")
end
@info("Parsing $(dump_file)....")
module MKLPrefsExample
using Preferences, Libdl
# Choose an MKL provider; taking an explicit preference as the first choice,
# but it nothing is set as a preference, fall back to an environment variable,
# and if that is not given, fall back to the default choice of `MKL_jll`.
const mkl_provider = something(
@load_preference("mkl_provider", nothing),
get(ENV, "MKL_PROVIDER", nothing),
# This file is machine-generated - editing it directly is not advised
[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
build: dgesv_accelerate dgesv_openblas
dgesv_accelerate: dgesv.c
clang -o $@ -DDGESV=dgesv $< -framework Accelerate
lib:
mkdir -p $@
lib/libgfortran.dylib: | lib
curl -L https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl/releases/download/CompilerSupportLibraries-v0.4.3%2B0/CompilerSupportLibraries.v0.4.3.aarch64-apple-darwin-libgfortran5.tar.gz | tar -zxv lib/libg*.dylib
lib/libopenblas.dylib: lib/libgfortran.dylib | lib