Changeset 5275


Ignore:
Timestamp:
Jan 24, 2017, 9:54:32 AM (10 months ago)
Author:
cameron
Message:

u8u16 working with -mmap-buffering and segment pipeline parallelism

Location:
icGREP/icgrep-devel/icgrep
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/pipeline.cpp

    r5274 r5275  
    122122    Value * nextSegNo = iBuilder->CreateAdd(segNo, iBuilder->getSize(1));
    123123    unsigned last_kernel = kernels.size() - 1;
    124     Value * alreadyDone = kernels[last_kernel]->getTerminationSignal(instancePtrs[last_kernel]);
    125     iBuilder->CreateCondBr(alreadyDone, exitThreadBlock, segmentWait[0]);
    126    
    127124    Value * doFinal = ConstantInt::getNullValue(iBuilder->getInt1Ty());
    128 
     125   
     126    iBuilder->CreateBr(segmentWait[0]);
    129127    for (unsigned k = 0; k < kernels.size(); k++) {
    130128        iBuilder->SetInsertPoint(segmentWait[k]);
     
    136134        }
    137135        else {
    138             // If the kernel terminated in a previous block then the pipeline is done.
     136            // If the kernel terminated in a previous segment then the pipeline is done.
    139137            BasicBlock * completionTest = BasicBlock::Create(iBuilder->getContext(), kernels[k]->getName() + "Completed", threadFunc, 0);
    140138            iBuilder->CreateCondBr(cond, completionTest, segmentWait[k]);
  • icGREP/icgrep-devel/icgrep/u8u16.cpp

    r5267 r5275  
    251251
    252252    const unsigned segmentSize = codegen::SegmentSize;
    253     const unsigned bufferSegments = codegen::BufferSegments;
     253    const unsigned bufferSegments = codegen::ThreadNum;
    254254   
    255255    assert (iBuilder);
     
    286286    // Different choices for the output buffer depending on chosen option.
    287287    ExternalFileBuffer U16external(iBuilder, iBuilder->getStreamSetTy(1, 16));
    288     LinearCopybackBuffer U16out(iBuilder, iBuilder->getStreamSetTy(16, 16), segmentSize * bufferSegments + 2);
    289 
    290     MMapSourceKernel mmapK(iBuilder, segmentSize * bufferSegments);
     288    LinearCopybackBuffer U16out(iBuilder, iBuilder->getStreamSetTy(16, 16), (segmentSize + 1) * bufferSegments);
     289
     290    MMapSourceKernel mmapK(iBuilder, segmentSize);
    291291    mmapK.generateKernel({}, {&ByteStream});
    292292    mmapK.setInitialArguments({fileSize});
Note: See TracChangeset for help on using the changeset viewer.