Wei Cheng

@WeiCheng14159

Joined on Sep 5, 2019

  • Problem description: This problem is based on LeetCode 137. Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one. (Credit to the original author 鄭育丞 who wrote the assembly in assignment 1) C code implementation The C code implementation is modified to fit in the emulator as follow: #define SIZE 10 int singleNumber(int arr[]) { int lower = 0, higher = 0, mask = 0;
     Like  Bookmark
  • tags: small_tpu GitHub repo link TensorFlow Quantization Flow digraph G { graph [rankdir="TB"]; node [color=red fontsize=10 fontname="Verdana"];
     Like  Bookmark
  • Progress report 2023 Spring 2022/12/29-2023/1/5 Study NXgraph paper Convert GraphChi shard to NXgraph-like 2D shard Fix C++ compatibility issue template <typename VertexDataType, typename EdgeDataType> class EngineBase { public: EngineBase<VertexDataType, EdgeDataType>(); //
     Like  Bookmark
  • [TOC] Short intro This paragragh documents my study and contribution to srv32 RV32 core. I verify the implementation and contribute hardware RTL code to enable RV32C instructions on it. Introduction srv32^MIT^ is a simple 3-stage pipeline RISC-V processor that supports FreeRTOS. This processor supports the following features: Three-stage pipeline processor RV32IM instruction sets
     Like  Bookmark
  • ria-jit Github ria-jit My fork ria-jit Paper [TOC] Short intro ria-jit is an open-sourced just-in-time RISC-V to x86 binary translator. It is built by students from Technical University of Munich and it outperforms QEMU, which is a free and open-source emulator. In this paragraph, I will go through the details of ria-jit, and demonstrate how I found a divide-by-zero bug by running RISC-V compliance tests on it. Why JIT (just-in-time) translation is difficult
     Like  Bookmark
  • A flexible and efficient design and implementation of CNN accelerator with 8-bit CLIP-Q quantization [TOC] Progress :::spoiler Milestone [x] Setup the env on server (140.116.245.115) [x] Full precision training of NIN model on CIFAR-10/100 [x] Fine-tuning with N-bit Clip-Q
     Like  Bookmark
  • [TOC] Proposed AI application: Mask detection In this project, we proposed an AI application that is capable of detecting whether a person is wearing a mask on a single webcam. The input of this system is video stream from a webcam. The ouptut of this system is a bouding box that goes around human faces. The box will turn green if the AI model detects that a person wears a mask. If not the box turns red. AI model SSD for object detection MobilenetV2 for mask detection
     Like  Bookmark
  • ZYNQ System TBD ZYNQ MMIO tutorial (aka HW3) Overview What is MMIO ? https://en.wikipedia.org/wiki/Memory-mapped_I/O
     Like 1 Bookmark
  • Student ID: P76091226, Name: 鄭惟 [TOC] Goals [x] Pass testbench 1 ~ 3 [x] Support (M*K)*(K*N) [x] Pass both pre-sim and post-sim
     Like  Bookmark
  • [TOC] 實驗環境 安裝 virtme 詳細的安裝流程可以參照 測試 Linux 核心的虛擬化環境 注意要使用以下的指令切換到 Linux kernel 5.10 $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
     Like  Bookmark
  • ria-jit Github My Github fork ria-jit Paper Goal [x] 研讀 ria-jit 論文並摘錄重點 [x] 整合 RISC-V Compliance test 並修正潛在的不相容 [x] DIVW 指令有問題已修正
     Like  Bookmark
  • Member: 鄭惟, 謝宜紘, 王傑世 Goal [x] Analyze and improve srv32^MIT^ [x] Setup environment [x] Run RTL sim [x] Run ISS sim [x] Run RISC-V compliance test (v1.0)
     Like  Bookmark
  • ria-jit 程式碼 ria-jit 論文 背景介紹 ria-jit 是一個在 user space 運作的動態翻譯模擬器,在 x86_64 Linux 上模擬 RISC-V Linux 64-bit 的執行環境 動態轉譯模擬器難在哪裡? 模擬器有兩個關鍵:正確性及速度,而這兩項關鍵需要一起考慮 這個模擬器需要考量以下幾點:
     Like 1 Bookmark
  • contributed by < WeiCheng14159 > Table of Content [TOC] Objectives Analyze how memory access patterns determine cache hit rates Analyze and discover which memory access patterns produce GOOD hit rates Analyze hit rates for caches and be able to optimize code accesses to produce good hit rates
     Like  Bookmark
  • Pinhole camera Consider the central projection of points in space onto a plane. Let the centre of projection be the origin of a Euclidean coordinate system, and consider the place $x=f$ which is called the image plane or focal plane. Given the point $(X,Y,Z)^T$ in 3D world coordinate, it's mapped to the point $(f X/Z, fY/Z, f)^T$ on the image plane. Ignoring the final image coordinate, we conclude that $$(X,Y,Z)^T \rightarrow (f X/Z, fY/Z, f)^T$$. Notice that this is a mapping from Euclidean space $R^3$ to Euclidean space $R^3$. The center of projection is called the camera center or optical center. The line from the camera center perpendicular to the image plane is called the principle axis or principal ray of the camera. The point where the principal axis meets the image plance is called the principal point. The plane through the camera center parallel to the image plane is called the principal plane of the camera.
     Like  Bookmark
  • 2D projective geometry is the study of properties of the projective plane $P^2$ that are invariant under a group of transformation known as projectivities. That is, an invertible mapping from points in $P^2$ to points in $P^2$ that maps lines to lines. :::success A projectivity is an invertible mapping $h$ from $P^2$ to itself such that three points $x_1, x_2, x_3$ lie on the same line if and only if $h(x_1),h(x_2),h(x_3)$ do. ::: A formal mathematical definition is math would be :::success A mapping $h: P^2 \rightarrow P^2$ is a projectivity if and only if there exists a non-singular 3x3 matrix $H$ such that, for any point in $P^2$ represented by a vector $x$, it's true that $h(x)=Hx$
     Like  Bookmark
  • Homogeneous representation of lines A line in plane is represented by an equation such as $ax+by+c=0$, different choice of a, b, c giving rise to different lines. Thus, a line may naturally be represented by the vector $(a,b,c)^T$ Notice that the correspondence between lines and vectors $(a,b,c)^T$ isn't one-to-one, since the line $ax+by+c=0$ and $(ka)x+(kb)y+(kc)=0$ are the same $\forall k \in R, k \neq 0$. So $(a,b,c)^T$ and $k(a,b,c)^T$ represent the same line. An equivalence class of vectors under this equivalence relationship is known as a homogeneous vector. Any paticular vector $(a,b,c)^T$ is a representative of the equivalence class. The set of equivalence classes of vectors in ${R^3 - (0,0,0)^T}$ (point zero excluede) forms the 2D projective space $P^2$ $$P^2 =R^3 - (0,0,0)$$
     Like 1 Bookmark
  • contributed by < WeiCheng14159 > Introduction How Compliance Tests work ? RISCV compliance tests are a set of rules that ensures a claimed RISCV implementation fits the basic standard and plays along with other RISCV implementation in the ecosystem. From the riscv-compliance/doc/README.adoc we can have a better understanding of the compliance tests. At the heart of the testing infrastructure is the detailed compliance test. This is the RISC-V assembler code that is executed on the processor and that provides results in a defined memory area (the signature). The test should only use the minimum of instructions and only those absolutely necessary. It should only use instructions and registers from the ISA instruction set on which it is targeted.
     Like  Bookmark
  • Preface There is much theory about parameter estimation, dealing with properties such as the bias and variance of the estimate. This theory is based on analysis of the probability density functions of the measurements and the parameter space. In this appendix, we discuss such topics as bias of an estimator, the variance, the Cramer-Rao lower bound on the variance, and the posterior distribution. Maximum Likelihood estimate An estimate of the parameter vector $\theta$ given a measured value $x$ is a function denoted $\hat \theta(x)$, assigning a parameter vector $\theta$ to a measurement $x$. The maximum likelihood (ML) estimate if given by $$\hat \theta_{ML} = \arg \max_{\theta} p(x|\theta)$$ Bias A desirable property of an estimator is that it can be expected to give the right answer on the average. Given a parameter $\theta$, or equivalently in our case a point on the world line, we consider all possible measurements $x$ and from them reertimate the parameter $\theta$, namely $\hat \theta (x)$.
     Like  Bookmark
  • What is epipolar gemoetry ? Epipolar geometry is the intrincic projective geometry between two views. It's independent of scene structure, and only depends on the camera's internal parameters and relative pose. The epipolar gemetry between two views is essentially the geometry of the intersection of the image planes with the pencil of planes with the pencil of planes having the baseline as axis. Notice the baseline is the line joining the camera centers. Epipolar geometry Suppose a point $X$ in 3D world is imaged in two views, at $x$ in the first view, and $x'$ in the second. What's the relation between the corresponding image points $x$ and $x'$ ? Notice the image points $x,x'$, and 3D world point $X$, and the camera center are epipolar, these three points form a plane $\pi$. :::info
     Like 1 Bookmark