Skip to content

Instantly share code, notes, and snippets.

View zh794390558's full-sized avatar

Hui Zhang zh794390558

  • baidu
  • beijing
View GitHub Profile
zh794390558 /
Created May 10, 2023 06:10 — forked from leimao/
Matrix Multiplication and Batched Matrix Multiplication Implementations Using C++ and CUDA.
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <random>
#include <stdexcept>
#include <vector>
#define BLOCK_DIM 32
zh794390558 / tfcompile.ipynb
Created March 22, 2019 06:42 — forked from carlthome/tfcompile.ipynb
Example of how to use XLA AOT via tfcompile to build a Keras model into a shared library.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
zh794390558 /
Created September 1, 2018 11:35 — forked from bpeterso2000/
Recursively walk a directory to a specified depth
" Reference: "
import os
import sys
def listdir(path):
recursively walk directory to specified depth
:param path: (str) path to list files from
# This file is useful for reading the contents of the ops generated by ruby.
# You can read any graph defination in pb/pbtxt format generated by ruby
# or by python and then convert it back and forth from human readable to binary format.
import tensorflow as tf
from google.protobuf import text_format
from tensorflow.python.platform import gfile
def pbtxt_to_graphdef(filename):
with open(filename, 'r') as f:
zh794390558 /
Created July 11, 2017 09:28 — forked from kastnerkyle/
Audio tools for numpy/python. Constant work in progress.
raise ValueError("DEPRECATED/FROZEN - see for the latest")
# License: BSD 3-clause
# Authors: Kyle Kastner
# Harvest, Cheaptrick, D4C, WORLD routines based on MATLAB code from M. Morise
# MGC code based on r9y9 (Ryuichi Yamamoto) MelGeneralizedCepstrums.jl
# Pieces also adapted from SPTK
from __future__ import division
import numpy as np
adapter: mysql2
encoding: utf8
database: my_database
username: root
- admin
- developer
- guest
zh794390558 / .clang-format
Created August 23, 2016 11:00 — forked from kristopherjohnson/.clang-format
Script that runs clang-format on files in a set of directories
BasedOnStyle: Webkit
BreakBeforeBraces: Allman
BreakConstructorInitializersBeforeComma: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Cpp11BracedListStyle: true
IndentCaseLabels: true
MaxEmptyLinesToKeep: 2
PointerBindsToType: false
SpacesBeforeTrailingComments: 2
Standard: Cpp11