Copy A to GPU. Sparse matrices are stored in memory using various compressed sparse storage formats such as CSR, CSC, and so on [39]. To compute the SAI preconditioner, the A matrix is initially stored in CSC format using three vectors called Avalue, Aindex, and Apointer. The M matrix is also produced and stored in columns. A copy of the A matrix is transferred to GPU global memory.
Compute n1 and n2 and allocate memory to M. The precondi- tioner M is stored in global memory, thus memory should be allocated to M prior to the Compute-GSAI stage. Although the dimensions of M are the same as A it has to be stored in compressed format to fit on the GPU global memory. To reduce the amount of computation required to locate data structures used by each warp and regularize global memory accesses, equal memory space is allocated to each column of M using the compute dimensions kernel (see Fig. 2). The proposed memory allocation technique, introduces the need for the Post-GSAI step described in the next section, whose execution time is, however, negligible compared to Compute- GSAI as shown in the results section (see Section 4) and to the provided benefits. The kernel first finds the dimensions of local A^ matrices (n1 , n2 ) and stores them on global memory and the maximum n1 and n2 values between all columns (called n1;max and n2;max) are then found. Since the number of nonzeros in the largest column of M is equal to n2;max, global memory allocated to M would be equal to the number of columns in M multiplied by the number of bytes required to store n2;max floating point values ðMvalue). The row indices corresponding to the values of the preconditioner (Mindex) and the number of nonzeros produced for each column of M (Mpointer) are stored in global memory. Besides allocating memory to the preconditioner M, the allocate memory step of the Pre-GSAI stage (see Fig. 2) assigns memory space to other data structures used during the computation of the SAIpreconditioner (Compute-GSAI) and determines the number of kernel calls required to compute the SAI preconditioner. Details of these implementations are presented in Section 3.2 and Table 1.
คัดลอกกับ GPU การฝึกอบรมเบาบางจะถูกเก็บไว้ในหน่วยความจำโดยใช้การบีบอัดในรูปแบบการจัดเก็บเบาบางต่างๆเช่นความรับผิดชอบต่อสังคม, CSC, และอื่น ๆ [39] การคำนวณ preconditioner ไทรเมทริกซ์จะถูกเก็บไว้ในรูปแบบแรก CSC ใช้สามเวกเตอร์ที่เรียกว่า Avalue, Aindex และ Apointer เอ็มเมทริกซ์ยังมีการผลิตและเก็บไว้ในคอลัมน์ สำเนาของเมทริกซ์จะถูกโอนไป GPU หน่วยความจำระดับโลก.
คำนวณ N1 และ N2 และการจัดสรรหน่วยความจำเพื่อเอ็ม tioner precondi- M จะถูกเก็บไว้ในหน่วยความจำระดับโลกดังนั้นหน่วยความจำควรจะจัดสรรให้ M ก่อนที่จะมีขั้นตอนการคำนวณ GSAI แม้ว่าขนาดของ M เป็นเช่นเดียวกับมันจะต้องมีการจัดเก็บในรูปแบบการบีบอัดเพื่อให้พอดีกับหน่วยความจำระดับโลกของ GPU เพื่อลดปริมาณของการคำนวณที่จำเป็นในการหาโครงสร้างข้อมูลที่ใช้โดยแต่ละวิปริตและระเบียบของหน่วยความจำระดับโลกเข้าถึงพื้นที่หน่วยความจำที่เท่ากันจะจัดสรรให้คอลัมน์ M แต่ละมิติโดยใช้การคำนวณเคอร์เนล (ดูรูปที่. 2) เทคนิคการจัดสรรหน่วยความจำที่นำเสนอแนะนำความจำเป็นในการขั้นตอนโพสต์ GSAI อธิบายไว้ในส่วนถัดไปที่มีเวลาการดำเนินการคืออย่างไรเล็กน้อยเมื่อเทียบกับ Compute- GSAI ตามที่แสดงในส่วนของผลการค้นหา (ดูมาตรา 4) และเพื่อผลประโยชน์ที่ . เคอร์เนลแรกพบว่าขนาดของท้องถิ่น ^ เมทริกซ์ (N1, N2) และเก็บไว้ในหน่วยความจำระดับโลกและค่า N1 และ N2 สูงสุดระหว่างคอลัมน์ทั้งหมด (เรียกว่า N1; แม็กซ์และ N2; แม็กซ์) พบแล้ว เนื่องจากจำนวนของ nonzeros ในคอลัมน์ที่ใหญ่ที่สุดของ M เท่ากับ N2; max, ที่มีหน่วยความจำระดับโลกที่จัดสรรให้กับ M จะเท่ากับจำนวนของคอลัมน์ในเอ็มคูณด้วยจำนวนไบต์ที่จำเป็นต้องใช้ในการจัดเก็บ N2 นั้นแม็กซ์จุดลอยค่าðMvalue) . ดัชนีแถวที่สอดคล้องกับค่านิยมของ preconditioner (Mindex) และจำนวน nonzeros ผลิตสำหรับคอลัมน์ของ M (Mpointer) แต่ละจะถูกเก็บไว้ในหน่วยความจำระดับโลก นอกจากจัดสรรหน่วยความจำไปยัง preconditioner M, จัดสรรขั้นตอนความทรงจำของขั้นตอนก่อนการ GSAI (ดูรูปที่. 2) กำหนดพื้นที่หน่วยความจำให้กับโครงสร้างข้อมูลอื่น ๆ ที่ใช้ในระหว่างการคำนวณของ SAIpreconditioner (คำนวณ GSAI) และกำหนดจำนวนของสายเคอร์เนล ที่จำเป็นในการคำนวณ preconditioner SAI รายละเอียดของการใช้งานเหล่านี้จะถูกนำเสนอในส่วน 3.2 และตารางที่ 1
การแปล กรุณารอสักครู่..
