Skip to content

Instantly share code, notes, and snippets.

@airMeng
airMeng / Debugging Xbyak via GDB.md
Last active December 25, 2023 06:57
Debugging Xbyak via GDB.md

OneDNN teams suggests to use SDE to dump the JITTed code like the following:

You can dump the JITTed kernel via the following c++ code:

void dump(const void *code, size_t code_size)
{
    FILE *file = fopen("dump.bin", "wb+");
    if (file) {
        size_t unused = fwrite(code, code_size, 1, file);
        fclose(file);
@daniil-lyakhov
daniil-lyakhov / inspect_ov_ir_weights.py
Created March 25, 2022 05:53
Way to inspect OpenVino IR model weights (openvino==2022.1.0)
# Openvino==2022.1.0
import sys
from openvino.runtime import Core
DELIMITER = ' | '
if len(sys.argv) < 3:
print("Please provide path to model xml file as a first arg and"
" path to output text file to dump model constants.")
@b01
b01 / download-vs-code-server.sh
Last active June 6, 2024 13:15
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
# Copyright 2023 Khalifah K. Shabazz
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the “Software”),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
@mauler
mauler / http_server_auth.py
Last active June 25, 2024 20:57 — forked from fxsjy/SimpleAuthServer.py
Python3 http.server supporting basic HTTP Auth (username/password)
# Extended python -m http.serve with --username and --password parameters for
# basic auth, based on https://gist.github.com/fxsjy/5465353
from functools import partial
from http.server import SimpleHTTPRequestHandler, test
import base64
import os
class AuthHTTPRequestHandler(SimpleHTTPRequestHandler):
@dennis-lee
dennis-lee / docker-basics.md
Created April 9, 2019 02:57
My cheat sheet for Docker related things
@tkf
tkf / .gitignore
Last active March 21, 2023 23:14
A script to locate libpython associated with the given Python executable.
*.pyc
.pytest_cache