$ curl https://sh.rustup.rs -sSf | sh
$ source "$HOME/.cargo/env"
$ rustc --version
$ sudo apt-get install pkg-config libssl-dev
$ cargo install --locked gptcommit
$ cd path_to_your_repo
Please follow the step in this tutorial.
$ gptcommit config set openai.api_key sk-...
gptcommit
as a git prepare-commit-msg hook$ gptcommit install
contributed by < qwe661234 >
Oct 8, 2023在多處理器的機器上,每個 CPU 都有自己的 cache,以彌補 CPU 和主記憶體(Main memory) 之間較慢的存取速度,當一個特定資料首次被特定的 CPU 讀取時,此資料顯然不存在於該 CPU 的 cache 中 (即 cache miss),意味著 CPU 需要自主記憶體中讀取資料 (為此,CPU 通常要等待數百個 cycle),此資料最終將會存放於 CPU 的 cache 中,這樣後續就能直接自 cache 上快速存取,不需要再透過主記憶體。因為每個 CPU 上的 cache 資料是 private 的,因此在進行寫入操作時,會造成其他 CPU 上的 cache 資料不一致的問題。
Oct 2, 2023(15pt) 1. Assume there is no forwarding in a 5-stage pipline processor 1 (1) (5pt) Please indicate all the potential hazards in the following instruction sequence ? xori x1, x1, 2 addi x6, x5, -4 lw x10, 8(x6) add x5, x6, x6 sub, x2, x2, x1 Ans: addi && lw (2.5pt)
Jun 8, 2023考量到 JIT 中 codegen 以及 compilation 的 overhead 過高,我們需要讓一個 EBB 含有更多的指令,理想是希望將一整個 loop body 涵蓋在一個 EBB 中。 我們參考 rvemu, rvemu 先將 block 以 unconditional jump 作切分,接著將其 block 中所有 branch taken 會走到的 block 都涵蓋進來,一個 block 含有大量的指令且有好的效能表現。 我們的新策略也是希望一個 block 中含有大量的指令,所以我們 trace 整個 control flow graph 並把 trace 過的 block 都涵蓋進來。 control flow graph 的終點有兩種情形,一種是 unconditional jump,而另一個則是遇到 back edge,也就是指向已經 trace 過的節點,下圖展示一個簡單的 EBB 案例。 過去的策略我們是直接指向某個 block 的 ir,一旦 block 被 cache 置換掉,EBB 就會變小。過去的另一個策略是用 memcpy,然而頻繁的 memcpy 成本過高,導致效能沒有很好的提昇。於是我們選用成本較低的 instruction fetch & decode,將 trace 到的 block 使用 instruction fetch & decode 存到 EBB 中,這個作法也不用擔心其他 block 被 cache 置換掉使 EBB 變小的問題。 另外,過去 EBB 有兩種版本,一種是 for interpter 而另一種是 for JIT 的,這導致作 JIT 時還要重新 extend 一次,現在則統一一種版本。 original EBB vs new EBB 指令數量
May 10, 2023or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up