Skip to content

Instantly share code, notes, and snippets.

View GMNGeoffrey's full-sized avatar

Geoffrey Martin-Noble GMNGeoffrey

View GitHub Profile
#!/bin/bash
# Copyright 2021 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# Protect yourself from accidentally pushing upstream. Leave the
# upstream push URL as a fake DISABLE. Then temporarily enable pushes
# when you do need them with this custom git subcommand. Run:
# `git sudo [command]` to run the `command` but with pushing to
# upstream enabled, e.g. `git sudo push upstream main`
@GMNGeoffrey
GMNGeoffrey / .gitconfig
Last active February 9, 2022 18:24
git commands
# Copyright 2020 Google LLC.
# SPDX-License-Identifier: Apache-2.0
[submodule]
recurse = false
fetchJobs = 8
[push]
#!/bin/bash
# Copyright 2022 Google LLC.
# SPDX-License-Identifier: Apache-2.0
set -e
set -o pipefail
if [[ -n "$(git status --porcelain --ignore-submodules)" ]]; then
echo "Working directory not clean"
@GMNGeoffrey
GMNGeoffrey / git-sudo.sh
Last active August 18, 2021 17:20
git-sudo
#!/bin/bash
# Copyright 2021 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# Protect yourself from accidentally pushing upstream. Leave the
# upstream push URL as a fake DISABLE. Then temporarily enable pushes
# when you do need them with this custom git subcommand. Run:
# `git sudo [command]` to run the `command` but with pushing to
# upstream enabled, e.g. `git sudo push upstream main`
@GMNGeoffrey
GMNGeoffrey / ctest.py
Last active February 11, 2021 23:32
ctest with directory specification
#!/usr/bin/python3
# Copyright 2021 Google LLC.
# SPDX-License-Identifier: Apache-2.0
#!/usr/bin/python3
import argparse
import subprocess
import sys
@GMNGeoffrey
GMNGeoffrey / README.md
Last active September 29, 2024 18:39
Interactive Builds: git-watch, cool-bazel, ibazel

Some little scripts I've found useful for development. git-watch retriggers a command when your git repo changes, so can give interactive rebuilds like ibazel except I found that https://github.com/bazelbuild/bazel-watcher didn't work for me at all. This is also completely agnostic to the command, so can be used with CMake as well, for instance.

@GMNGeoffrey
GMNGeoffrey / gist:2b99d7625658fa489ffada25313e3be1
Created August 25, 2020 19:11
Swiftshader libstdc++ 6 v5.4 build errors
FAILED: /usr/local/bin/clang++ -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -I/swiftshader/src/Pipeline/.. -I/swiftshader/include -I/swiftshader/third_party/SPIRV-Headers/include -I/swiftshader/src/Pipeline -I/swiftshader/src/System/.. -I/swiftshader/third_party/marl/include -I/swiftshader/third_party/SPIRV-Tools/include -m64 -fPIC -march=x86-64 -mtune=generic -O3 -DNDEBUG -Os -DNDEBUG -DANGLE_DISABLE_TRACE -ffunction-sections -fdata-sections -fomit-frame-pointer -fPIC -Wall -Wreorder -Wsign-compare -Wmissing-braces -Wextra -Wunreachable-code-loop-increment -Wunused-lambda-capture -Wstring-conversion -Wextra-semi -Wignored-qualifiers -Wno-unneeded-internal-declaration -Wno-unused-private-field -Wno-comment -Wno-undefined-var-template -Wno-extra-semi -Wno-unused-parameter -Wno-deprecated-copy -Wno-unknown-warning-option -fno-operator-names -DREACTOR_DEFAULT_OPT_LEVEL=Default -fno-exceptions -Wthread-safety -Werror -std=gnu++14 -MD -MT src/Pipeline/CMakeFiles/vk_pipeline.dir/ComputeProgram.cpp.o -MF
--aarch64-neon-syntax=<value> --aarch64-neon-syntax=<value>
> --affine-data-copy-generate
--affine-loop-fusion --affine-loop-fusion
> --affine-loop-invariant-code-motion
> --affine-loop-tile
> --affine-loop-unroll-jam
> --affine-loop-unroll
> --affine-parallelize
--affine-pipeline-data-transfer --affine-pipeline-data-transfer