劉晉華

@Jimmy-Liu1021

Joined on Mar 2, 2021

  • Question 1 We consider weight pruning. Which of the following are true? [ ] (a) We learned in the previous lecture that a convolutional layer is an MMM. Under structured pruning, where whole filters are pruned from a convolutional layer, the MMM for this pruned convolution layer will have a reduced size for that layer's weight matrix. However, the subsequent layer's input tensor will not have a reduced size. :::info Unstructured pruning: 非結構的剪枝只會將剪去的 weight 設置為 0,故對於模型的參數 (大小) 並無影響 Structured pruning: 下圖為 Kernel $n_{i+1}$ 剪去 $F_{i,j}$ 後對於 feature map $X_{i+1}$ 以及下一個 Kernel $n_{i+2}$ 的影響
     Like  Bookmark
  • contributed by < jimmyliu-1021 > 測驗 1 考慮以下對2個無號整數取平均值的程式碼: #include <stdint.h> uint32_t average(uint_t a, uint_t b) { return (a + b) / 2; }
     Like  Bookmark
  • Question 1 This problem applies SIMD to the outer product MMM scheme of today’s lecture. Consider outer product MMM between two 3x4 and 4x5 tiles derived by partitioning large matrices. The diagram below depicts the outer product between a column vector in the red tile and the corresponding row vector in the blue tile. Suppose that there are wide registers for SIMD operations and sufficient memory bandwidth for load/store operations to/from these registers. Which of the following are true? [x] (a) In this example, there are 4 outer products to be performed. [ ] (b) Using SIMD instructions operating on 5-long vectors, we can spped up each outer product computation 15x compared to non-SMID scalar instructions. :::info
     Like  Bookmark
  • contributed by <jimmy-liu1021> 測驗連結 參考筆記 contributed by<jim12312321> 測驗 1 LeetCode 中編號1的題目 Two Sum:題意為給定一個陣列 nums 和一個目標值 target,求找到 nums 中的2個元素相加會等於 target 的索引值。例如:nums = [2, 7, 11, 15], target = 9,相加為9的元素僅有2跟7,故回傳這兩個元素的索引值 [0, 1] 以下是引入 hash table 的實作,學習 Linux 核心程式碼風格: #include <stddef.h>
     Like  Bookmark
  • contributed by < jimmy-liu1021 > 自我檢查清單 [x] 研讀上述 ==Linux 效能分析的提示== 描述,在自己的實體電腦運作 GNU/Linux,做好必要的設定和準備工作 $\to$ 從中也該理解為何不希望在虛擬機器中進行實驗; [x] 研讀上述費氏數列相關材料 (包含論文),摘錄關鍵手法,並思考 clz / ctz 一類的指令對 Fibonacci 數運算的幫助。請列出關鍵程式碼並解說 [ ] 複習 C 語言 數值系統 和 bitwise operation,思考 Fibonacci 數快速計算演算法的實作中如何減少乘法運算的成本; [ ] 研讀 KYG-yaya573142 的報告,指出針對大數運算,有哪些加速運算和縮減記憶體操作成本的舉措? [ ] lsmod 的輸出結果有一欄名為 Used by,這是 "each module's use count and a list of referring modules",但如何實作出來呢?模組間的相依性和實際使用次數 (reference counting) 在 Linux 核心如何追蹤呢?
     Like  Bookmark
  • contributed by jimmy-liu1021 測驗1 #include <stddef.h> #include <stdint.h> #include <limits.h> #include <string.h> #include <stdio.h> /* Nonzero if either X or Y is not aligned on a "long" boundary */
     Like  Bookmark
  • contributed by <jimmy-liu1021> Reviewed by kevinshieh0225 使用 &node->list 來取得 dereference list of address. 因為在運算次序中 derefence -> 高於 &。這樣不必使用 // cppcheck-suppress memleak 請善用 linux kernel api list_for_each, list_for_each_entry, list_for_each_safe, list_for_each_entry_safe q_remove_head 重複做了 list_del(head->next); 可再簡化。 實驗環境 $ gcc -v
     Like  Bookmark