in segments, the second processes each segment on the GPU, and third reads the results for each segment back from device memory asynchronously. To ensure that the processing of a segment does not begin before the asynchronous transfer of that segments data from a host to device completes and also that the reading of the results for a segment begins only after the completion of the processing of the segment, CUDA provides the concept of a stream. Within a stream, tasks are done in sequence. With reference to Fig. 4, the number of streams equals the number of segments and the tasks in the ith stream are: write segment i to device memory, process segment i, read the results for segment i from device memory. To get the correct results, each segment sent to the device memory must include the additional maxL 1 characters needed to detect matches that cross segment boundaries.
For strategy A to work, we must have sufficient device memory to accommodate the input data for all segments as well as the results from all segments. Fig. 5 gives an alternative strategy that requires only sufficient device memory for two segments (two input buffers IN0 and IN1 and two output buffers OUT0 and OUT1). In this strategy, the GPU processes input data that is in IN0 (IN1) and writes the results to OUT0 (OUT1). While the GPU is using buffers IN0 and OUT0 (or IN1 and OUT1) in this way, the host writes to IN1 and reads from OUT1 (or IN0 and OUT0). We could, of course, couple strategies A and B to obtain a hybrid strategy.
We analyse the relative time performance of these two host-to-host strategies in the next section.
4.2 Completion Time-One I/O Channel
In this section, we analyse the performance of strategies A and B for GPUs such as the GT200 and C1060 that have a single I/O channel to the host. In this case, it is not possible to overlap the transfer of input data from a host to GPU with the transfer of results from GPU to host. Fig. 6 summarises the notation used in our analysis of the completion time of strategies A and B.
For our analysis, we make several simplifying assumptions as below:
1. The time, tw, to write or copy a segment of input data from the host to the device memory is the same for all segments.
2. The time, tp, the GPU takes to process a segment of input data and create its corresponding output segment is the same for all segments.
3. The time, tr, to read or copy a segment of output data from the host to the device memory is the same for all segments.
4. The write, processing, and read for each segment begins at the earliest possible time for the chosen strategy and completes tw, tp, and tr units later, respectively.
5. In every feasible strategy, the relative order of segment writes, processing, and reads is the same and is segment 0, followed by segment 1;..., and ending with segments 1, where s is the number of segments.
ในส่วนกระบวนการที่สองแต่ละกลุ่มบน GPU และที่สามอ่านผลสำหรับแต่ละกลุ่มกลับมาจากหน่วยความจำอุปกรณ์อะ . เพื่อให้แน่ใจว่ากระบวนการของกลุ่ม ไม่ได้เริ่มต้นก่อนการโอนที่ไม่ตรงกันส่วนข้อมูลจากโฮสต์ไปยังอุปกรณ์เสร็จสมบูรณ์ และยัง ว่า การอ่านผล ส่วนจะเริ่มหลังจากเสร็จสิ้นการประมวลผลของกลุ่มการให้แนวคิดของลำธาร ภายในลำธาร งานเสร็จแล้ว ในลำดับ โดยอ้างอิงจากรูปที่ 4 , จํานวนของกระแสเท่ากับจำนวนกลุ่มและงานใน ith กระแสจะเขียนส่วนผมหน่วยความจำอุปกรณ์ กระบวนการ ส่วนผม ส่วนผมอ่านผลจากหน่วยความจำอุปกรณ์ เพื่อให้ได้ผลลัพธ์ที่ถูกต้อง แต่ละกลุ่มส่งอุปกรณ์หน่วยความจำ จะต้องมี maxl อีก 1 ตัวต้องตรวจสอบตรงส่วนที่ข้ามเขตแดนไปสำหรับกลยุทธ์ที่จะทำงาน เราต้องมีอุปกรณ์หน่วยความจำเพียงพอที่จะรองรับข้อมูลที่ป้อนให้ทุกกลุ่ม รวมทั้งผลจากทุกกลุ่ม ภาพที่ 5 ให้เลือกกลยุทธ์ที่ต้องใช้เพียงเพียงพออุปกรณ์หน่วยความจำ 2 ส่วน ( สองอินพุตบัฟเฟอร์ in0 1 และสองเอาท์พุทบัฟเฟอร์และ out0 และ out1 ) ในกลยุทธ์นี้ GPU กระบวนการป้อนข้อมูลที่อยู่ใน in0 ( 1 ) และเขียนผลลัพธ์ที่ out0 ( out1 ) ในขณะที่ GPU จะใช้บัฟเฟอร์และ in0 out0 ( หรือ 1 และ out1 ) วิธีนี้โฮสต์ เขียนและอ่านจาก out1 1 ( หรือ in0 และ out0 ) เราสามารถ แน่นอน สองกลยุทธ์ A และ B จะได้รับกลยุทธ์ไฮบริดเราวิเคราะห์เวลาญาติประสิทธิภาพของทั้งสองโฮสต์กลยุทธ์ในส่วนถัดไป4.2 เวลาแล้วเสร็จหนึ่ง I / O ช่องทางในส่วนนี้เราจะวิเคราะห์ประสิทธิภาพของกลยุทธ์ A และ B เช่นจีที200 ต่อ และ c1060 ที่มีช่องทางเดียว I / O กับโฮสต์ ในกรณีนี้ , มันเป็นไปไม่ได้ที่จะถ่ายโอนข้อมูลซ้อนข้อมูลจากโฮสต์ไปยัง GPU กับการถ่ายโอนของผลลัพธ์จาก GPU เพื่อโฮสต์ ภาพที่ 6 summarises สัญลักษณ์ที่ใช้ในการวิเคราะห์ของเรา เวลาแล้วเสร็จของกลยุทธ์ A และ Bการวิเคราะห์ของเราเราให้สมมติฐานหลายระบบดังนี้1 . เวลา , TW , เขียนหรือคัดลอกส่วนของข้อมูลจากโฮสต์ไปยังอุปกรณ์ที่จำ เป็นเหมือนกันทั้งกลุ่ม2 . เวลา , TP , GPU ใช้กระบวนการกลุ่มของข้อมูล และสร้างผลผลิตของกลุ่มที่เหมือนกันสำหรับทุกกลุ่ม3 . เวลา , TR , อ่านหรือคัดลอกส่วนของการส่งออกข้อมูลจากโฮสต์ไปยังอุปกรณ์ที่จำ เป็นเหมือนกันทั้งกลุ่ม4 . เขียน , การประมวลผล และอ่านแต่ละส่วนเริ่มต้นในเวลาที่เร็วที่สุดสำหรับกลยุทธ์ที่เลือกและเสร็จสิ้น TW , TP , และหน่วย TR ต่อมาตามลำดับ5 . ทุกความเป็นไปได้กลยุทธ์ เพื่อญาติของส่วนประมวลผล และ อ่าน เขียน เป็นแบบเดียวกันและเป็นส่วน 0 ตามด้วย ส่วนที่ 1 . . . . . . . และลงท้ายด้วยส่วนที่ 1 ซึ่งเป็นหมายเลขของกลุ่ม
การแปล กรุณารอสักครู่..
