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 / litepcie_opt_rom.py
Created December 14, 2022 23:02 — forked from jevinskie/litepcie_opt_rom.py
I have a lazy friend wildcard who needs help creating his FPGA design. Implement a PCIe device with an option rom by using the LiteX Python framework.
from litex.build.generic_platform import *
from litex.build.xilinx import XilinxPlatform
# Create the platform object
platform = XilinxPlatform("my_platform")
# Add the PCIe device to the platform
platform.add_extension([
("pcie_phy", 0,
Subsignal("rst_n", Pins("")),
@cbalint13
cbalint13 / image-match-timelapse.py
Last active April 23, 2022 09:05
Image coregister for timelapse
#!/usr/bin/python3
"""
**********************************************************
* BSD License *
* Copyright (c) 2022 *
* Balint Cristian <cristian dot balint at gmail dot com> *
**********************************************************
# Little script to Homography match images into animation
@cbalint13
cbalint13 / OpenLANE.md
Last active April 1, 2023 16:50
OpenLANE steps
@cbalint13
cbalint13 / o5gs-debug-tlv-parse.diff
Last active October 21, 2021 08:03
o5gs-debug-tlv-parse.diff
diff --git a/lib/core/ogs-tlv.c b/lib/core/ogs-tlv.c
index a43108f..8be4268 100644
--- a/lib/core/ogs-tlv.c
+++ b/lib/core/ogs-tlv.c
@@ -398,6 +398,31 @@ uint32_t ogs_tlv_render(ogs_tlv_t *root,
return (pos - blk);
}
+
+static void dump_root_tlv_chain(ogs_tlv_t *root)
@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/ \
@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
###
#!/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 / 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

--- 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(),
#!/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