--- tags: HW --- # 資訊科技產業專案設計課程作業 3 ## [SiFive : LLVM Compiler Engineer - RISC-V Vector](https://www.sifive.com/careers/5169976003/llvm-compiler-engineer-risc-vector-hsinchu-taiwan) ### Responsibilities: + Working with SiFive’s LLVM compiler team on improving performance for the SiFive Intelligence processor family, especially focusing on the RISC-V vector extension C intrinsic improvement. + Working with SiFive’s benchmarking teams in analyzing performance results and suggesting new compiler optimizations. + Working with SiFive’s compiler and release teams in releasing timely compiler toolchains for use by SiFive software and hardware teams. ### Requirements: + A degree in Computer Science or equivalent technical field of study. + Have completed coursework, projects, internships, and/or research in data structures/algorithms and compilers. + Have completed at least one internship, research assistantship, teaching assistantship, or equivalent practical experience in compilers. + Having experience with SIMD (like NEON, AVX, SSE) programming for performance improvement is a big plus. + Strong C++ programming skills. ## [SiFive : Performance Analysis Engineer - Software](https://www.sifive.com/careers/5172390003/performance-analysis-engineer-software-hsinchu-taiwan) ### Responsibilities: + Performance analysis, and optimization. + Development analysis tool for performance in a Linux environment. + Benchmark and workload characterization. + Collaborate with teams to uplift best performance. ### Requirements: + Experience with C/C++ + Strong knowledge of Linux scripting languages. (e.g: python, and bash) + Experience in performance bottleneck analysis, and related tools. (e.g.: gprof, perf, gnu binutils) + Experience with program profiling, and characterization. + Strong knowledge of analyzing assembly code is a plus. ## [Qualcomm : GPU Compiler Development Engineer](https://qualcomm.dejobs.org/hsinchu-city-twn/gpu-compiler-development-engineer/326C0D8FB80F4258B87C6B0A8CE1A1B5/job/) ### Responsibilities: This position will be responsible for research, development and delivery of Qualcomm's Adreno GPU compiler products to our world wide customers. At same time, there will be opportunities to influence GPU hardware design based on experience on how our GPU compiler has been used by real world users. Depending on the specific role, interactions with GPU architecture design team, graphics driver team and international graphics programming standard specification committees might be required. ### Minimum Qualifications: + Hands-on compiler development experience (proprietary or open source) + Knowledge or experience of compiler stages (parsing, transformations and code generation) + Good C++ programming skills + Good communication skills and teamwork spirit, reliable and self-motivated ### Preferred Qualifications: + LLVM compiler development + DirectX, OpenGL/Vulkan, OpenCL, or CUDA compiler development + D3D/OpenGL/Vulkan/OpenCL/CUDA driver development + Ray tracing knowledge and/or development + Graphics knowledge or graphics/game software development ### Required: Bachelor's degree in Computer Science, Electrical Engineering, Information Systems, or related field. ### Preferred: Master's degree or PhD in Computer Science, Electrical Engineering, Information Systems, or related field ## 模擬面試 以 SiFive : LLVM Compiler Engineer - RISC-V Vector 為例 😈:interviewer 🤓:interviewee 😈:你好,我是今天面試的面試官,請先你簡短的簡介一下你的經歷嗎 🤓:你好我是XXX,大學就讀成功大學資訊工程學系,而目前就讀於成功大學資訊工程研究所,大學時有參與實驗室的計畫,花了一年的時間在開發網頁前後端,所以對於這個領域有一定經驗,另外畢業專題則是做公開募款系統,這個系統結合網頁前後端與區塊鏈的特性,使募款過程簡化及達到金流公開透明,在研究所的部分,我的研究方向為量子電腦的模擬器與編譯器,本身對於編譯器、效能分系很有興趣,目前正在學習這方面的知識與累積相關的經驗。 😈:那請你簡單說明一下,為何會想選擇我們這份工作呢 🤓:首先本身對於編譯器及效能分析就有興趣,然後這份工作又會用到 LLVM,剛好我在論文研究時也有用到,另外最近也有稍微接觸 RISC-V 對於它的應用與未來發展有相當大的興趣,綜合上述原因,我是非常希望能接下這份工作 😈:謝謝你的分享,既然你對編譯器有興趣,那可以分享一下過往的相關經驗嗎 🤓:好,首先在大學時就有修過 compiler 課程,所以對於 compile 流程及每個步驟做了哪些事都有一定的了解,另外在這門課也有利用 Lex 及 Yacc 來實作出一個簡單的 compiler ,接著在研究所時因為研究量子語言的編譯而有接觸到許多不同的開源軟體,其中主要在研究一個基於 LLVM 的 Quantum-Classical 異質運算編譯器,目標是利用增加不同的 pass 及效能分析,來達到加速量子程式運算的目的 😈:謝謝你的分享,這些都是個不錯的經驗,那接下來會問你一些問題,請盡你所能回答 🤓:好,了解 😈:那麼首先請你簡單的講解 compile 的整個流程 🤓:首先原始程式碼會經過 Scanner 做詞法分析,生成 token stream,接著再經過 Parser 來做語法分析,生成 syntax tree,再來做 semantic analysis 來確保語意符合編譯語言的規則,上述是編譯器的 front-end,接下來則是 back-end 的部分,back-end 首先會將 syntax tree 轉成 intermediate representation(IR) ,接著會進行優化然後再轉成 target machine code 😈:那麼基於你講的這個流程,LLVM 在其中扮演甚麼角色 🤓:LLVM 將編譯階段的每個步驟模組化,並兼容不同語言的 front-end 及不同機器的 back-end,另外 LLVM IR 的出現,使得 IR 的優化可以利用共通模組(Pass)來執行,使得整個編譯流程更加的有彈性,此外也減少開發新編譯器的難度 😈:在 llvm 中有用到 static single assignment form(又稱SSA)的概念,請簡介它 🤓:SSA 是 IR 的一種特性,每個變數只會被賦值一次,許多編譯器最佳化演算法都可利用 SSA 來達成,下面簡單介紹一個轉 SSA form的例子 ![](https://i.imgur.com/eYqYOES.png)![](https://i.imgur.com/UXBSibI.png) 首先最上層的 block,因為 x 被賦值兩次,所以我們利用下標 1 和 2 使得 x 變成兩個不同的變數以達到每個變數只會被賦值一次的特性,但可以發現在最下層的 block 中,y 不知道要用哪一個 y,所以這時候就要利用 φ function 來定義一個新的 y 😈:謝謝你的回答,今天的面試到這裡就結束了,如果有進一步的消息會再通知你 🤓:謝謝 ## 相關面試文章 [Nvidia Interview Experience for Compiler Engineer](https://www.geeksforgeeks.org/nvidia-interview-experience-for-compiler-engineer/) [水果DL Compiler Engineer面試](https://ptthito.com/soft_job/m-1638590872-a-7aa/)