Skip to content

Instantly share code, notes, and snippets.

View cbalint13's full-sized avatar

Balint Cristian cbalint13

  • Earth, MilkyWay, Laniakea
View GitHub Profile
@cbalint13
cbalint13 / old-vs-new-winograd-2_4.log
Created July 24, 2019 20:23
TVM_Winograd_OLD_vs_NEW_2_4_6
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@cbalint13
cbalint13 / winograd_tile_size.py
Last active August 6, 2019 05:47
Upgrade TOPHUB winograd entries.
#!/usr/bin/python3
import sys
import json
old_file = 'arm_cpu_v0.04.log'
new_file = 'arm_cpu_v0.05.log'
fn = open(new_file, 'w')
with open(old_file) as fp:
@cbalint13
cbalint13 / yolo-quantization-demo.py
Last active January 10, 2024 09:29
TVM quantized YoloV3 demo
#!/usr/bin/python3
import nnvm
import nnvm.frontend.darknet
import tvm.relay.testing.yolo_detection
import tvm.relay.testing.darknet
import tvm.relay.transform as _transform
import matplotlib.pyplot as plt
import numpy as np
import tvm
@cbalint13
cbalint13 / yolov3-tiny.tune.log
Last active January 24, 2020 15:58
YoloV3 Tiny quantization tuned parameters
{"i": ["llvm", "topi_x86_conv2d_NCHWc", [["TENSOR", [1, 256, 26, 26], "int8"], ["TENSOR", [255, 256, 1, 1], "int8"], [1, 1], [0, 0], [1, 1], "NCHW", "int32"], {}, ["conv2d", [1, 256, 26, 26, "int8"], [255, 256, 1, 1, "int8"], [1, 1], [0, 0], [1, 1], "NCHW", "int32"], {"i": 5, "t": "direct", "c": null, "e": [["tile_ic", "sp", [8, 32]], ["tile_oc", "sp", [255, 1]], ["tile_ow", "sp", [26, 1]], ["tile_oh", "ot", 1]]}], "r": [[0.002006969857142857], 0, 1.7788748741149902, 1564778173.0481853], "v": 0.1}
{"i": ["llvm", "topi_x86_conv2d_NCHWc", [["TENSOR", [1, 384, 26, 26], "int8"], ["TENSOR", [256, 384, 3, 3], "int8"], [1, 1], [1, 1], [1, 1], "NCHW", "int32"], {}, ["conv2d", [1, 384, 26, 26, "int8"], [256, 384, 3, 3, "int8"], [1, 1], [1, 1], [1, 1], "NCHW", "int32"], {"i": 525, "t": "direct", "c": null, "e": [["tile_ic", "sp", [3, 128]], ["tile_oc", "sp", [8, 32]], ["tile_ow", "sp", [1, 26]], ["unroll_kw", "ot", true]]}], "r": [[0.01963637225], 0, 5.333110809326172, 1564779398.703997], "v": 0.1}
{"i": ["llvm", "topi
#!/usr/bin/python3
#import nnvm.frontend.darknet
import tvm.relay.testing.yolo_detection
import tvm.relay.testing.darknet
import tvm.relay.transform as _transform
import matplotlib.pyplot as plt
import numpy as np
import tvm
import onnx
--- a/modules/dnn/src/cuda4dnn/csl/cudnn/convolution.hpp.orig 2020-06-08 17:01:47.788349629 +0300
+++ b/modules/dnn/src/cuda4dnn/csl/cudnn/convolution.hpp 2020-06-08 16:50:51.579297388 +0300
@@ -260,10 +260,10 @@
const TensorDescriptor<T>& output)
{
CUDA4DNN_CHECK_CUDNN(
- cudnnGetConvolutionForwardAlgorithm(
+ cudnnGetConvolutionForwardAlgorithm_v7(
handle.get(),
input.get(), filter.get(), conv.get(), output.get(),
@cbalint13
cbalint13 / feature.md
Created August 5, 2020 17:46 — forked from merrymercy/feature.md
Feature description for autotvm

Features

Loop-based Feature

For an IterVar (or an axis), it has three kinds of features

  • axis attribute
  • arithmetic feature
  • touch feature

Axis Attribute

#!/usr/bin/python3
import sys
import numpy as np
import matplotlib.pyplot as plt
def get_cmap(n, name='hsv'):
'''Returns a function that maps each index in 0, 1, ..., n-1 to a distinct
RGB color; the keyword argument name must be a standard mpl colormap name.'''
return plt.cm.get_cmap(name, n)
@cbalint13
cbalint13 / tvm-micro-pr7392.py
Created February 2, 2021 16:57
tvm-micro-pr7392
#!/usr/bin/python
import onnx
import numpy as np
import tvm
from tvm import te
import tvm.relay as relay
###
@cbalint13
cbalint13 / o5gs-issue-1201.c
Last active October 20, 2021 10:12
Testcase for open5gs issue #1201
/*
COMPILE:
gcc testcase.c -g -O2 \
-DOGS_GTP_INSIDE -DOGS_GTP_COMPILATION \
-I/home/cbalint/rpmbuild/BUILD/open5gs/lib/gtp \
-I/home/cbalint/rpmbuild/BUILD/open5gs/lib/core \
-I/home/cbalint/rpmbuild/BUILD/open5gs/redhat-linux-build/lib \
-I/home/cbalint/rpmbuild/BUILD/open5gs/lib \
-I/home/cbalint/rpmbuild/BUILD/open5gs/lib/app/ \