2. BACKGROUND AND MOTIVATION
NVIDIA’s Fermi GPU architecture [8] consists of multiple
independent streaming multiprocessors (SM), sharing an off-
chip memory. Each SM has a private instruction and data
cache, a scratchpad (shared) memory, 32 cores, 16 load-store
units, 4 special function units and two schedulers, see Fig. 1.
GPUs are programmed in an explicitly data-parallel language
such as CUDA or OpenCL. The programmer writes
code for a single thread, specifies how many threads have
to be invoked and groups these threads in blocks, as only
threads within a block can synchronize and share data via
the shared memory.
As an example, consider the activity graph in Fig. 2 of
an SM executing a 2D convolution kernel (see also Section
4). The SM’s activity is split in three groups: (1) integer
instructions representing address calculations and control
operations, (2) floating point instructions on actual data
and (3) load and store operations. Both the naive version
(Fig. 2a) and the optimized version (Fig. 2b) start with address
calculations, after which load instructions are issued.
After an idle period the data arrives from the off-chip memory
and floating point instructions are issued. The optimized
kernel shows fewer load operations (and corresponding address
calculations) than the naive implementation, due to
the caching of data elements in registers (see Section 4.1).
Although the kernel in Fig. 2b is optimized and minimizes
the number of memory loads, there are still idle cycles
where the SM is stalled waiting for data, despite of the many
threads it is executing to hide latency. Furthermore, a lot
of cycles are spent on address calculations and load instructions
rather than calculations on actual data. In 64% of the
clock cycles at least one of the two schedulers in the SM is
idle. Of the executed instructions 34% is used for floating
point instructions on actual data, resulting in only 12% of
the possible executed instructions over the duration of the
kernel being spend on computations on actual data
2. พื้นหลัง และแรงจูงใจสถาปัตยกรรมพลังงานแฟร์มี GPU ของ NVIDIA [8] ประกอบด้วยหลายขึ้นอยู่กับสตรีมมิ่งนี้ (SM), ร่วมการปิด-หน่วยความจำของชิป แต่ละ SM มีสอนส่วนตัวและข้อมูลแคช จำ scratchpad (ร่วม) แกน 32 ร้านโหลด 16หน่วย หน่วยฟังก์ชันพิเศษ 4 และสอง schedulers ดู Fig. 1GPUs เป็นโปรแกรมภาษาการขนานข้อมูลอย่างชัดเจนเช่น CUDA หรือ OpenCL เขียนโปรแกรมเมอร์รหัสสำหรับเธรดเดียว ระบุหัวข้อการเรียกใช้กลุ่มหัวข้อเหล่านี้ในบล็อก เพียงหัวข้อในบล็อกสามารถตรงกัน และแบ่งปันข้อมูลผ่านหน่วยความจำที่ใช้ร่วมกันเป็นตัวอย่าง พิจารณากราฟใน Fig. 2 ของกิจกรรมSM เป็นปฏิบัติการเคอร์เนล 2D convolution (โปรดดูส่วน4) . กิจกรรมของ SM ถูกแบ่งออกเป็นสามกลุ่ม: จำนวนเต็ม (1)คำแนะนำที่แสดงถึงการคำนวณที่อยู่และการควบคุมการดำเนินงาน, (2) น้ำจุดคำแนะนำในข้อมูลที่แท้จริงและ (3) โหลด และเก็บการดำเนินการ ทั้งสองรุ่นขำน่า(Fig. 2a) และการเริ่มต้นรุ่นเพิ่มประสิทธิภาพ (Fig. 2b) มีที่อยู่คำนวณ หลังจากที่ออกคำสั่งโหลดหลังจากรอบระยะเวลาการใช้งาน ข้อมูลมาจากหน่วยความจำออกจากชิพและคำแนะนำจุดลอยออก การเพิ่มประสิทธิภาพเคอร์เนลแสดงน้อยโหลดการดำเนินงาน (และที่อยู่ที่เกี่ยวข้องคำนวณ) กว่างานขำน่า เนื่องการแคขององค์ประกอบข้อมูลในทะเบียน (ดูหัวข้อ 4.1)แม้ว่าเคอร์เนลใน Fig. 2b สุด และช่วยลดthe number of memory loads, there are still idle cycleswhere the SM is stalled waiting for data, despite of the manythreads it is executing to hide latency. Furthermore, a lotof cycles are spent on address calculations and load instructionsrather than calculations on actual data. In 64% of theclock cycles at least one of the two schedulers in the SM isidle. Of the executed instructions 34% is used for floatingpoint instructions on actual data, resulting in only 12% ofthe possible executed instructions over the duration of thekernel being spend on computations on actual data
การแปล กรุณารอสักครู่..
