Ignore:
Timestamp:
Nov 2, 2018, 7:18:31 PM (12 months ago)
Author:
nmedfort
Message:

Initial version of PipelineKernel? + revised StreamSet? model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/toolchain/toolchain.cpp

    r6030 r6184  
    1010#include <llvm/Support/CommandLine.h>
    1111#include <llvm/Support/raw_ostream.h>
     12#include <boost/interprocess/mapped_region.hpp>
    1213
    1314using namespace llvm;
     
    2021
    2122namespace codegen {
     23   
     24inline unsigned getPageSize() {
     25    return boost::interprocess::mapped_region::get_page_size();
     26}
    2227
    23 const unsigned DEFAULT_SEGMENT_SIZE = 64;
    24    
    2528static cl::OptionCategory CodeGenOptions("Code Generation Options", "These options control code generation.");
    2629
     
    3134                        clEnumVal(TraceDynamicBuffers, "Show dynamic buffer allocations and deallocations."),
    3235                        clEnumVal(EnableAsserts, "Enable built-in Parabix framework asserts in generated IR."),
     36                        clEnumVal(EnableMProtect, "Use mprotect to cause a write fault when erroneously overwriting kernel state / stream space.\n"
     37                                                  "NOTE: this requires memory to be page-aligned, which may still hide errors."),
    3338                        clEnumVal(EnableCycleCounter, "Count and report CPU cycles per kernel."),
    3439                        clEnumVal(DisableIndirectBranch, "Disable use of indirect branches in kernel code.")
     
    6873
    6974
    70 static cl::opt<unsigned, true> SegmentSizeOption("segment-size", cl::location(SegmentSize), cl::init(DEFAULT_SEGMENT_SIZE),
    71                                             cl::desc("Segment Size"), cl::value_desc("positive integer"));
     75static cl::opt<unsigned, true> SegmentSizeOption("segment-size", cl::location(SegmentSize),
     76                                               cl::init(getPageSize()),
     77                                               cl::desc("Expected amount of input data to process per segment"), cl::value_desc("positive integer"), cl::cat(CodeGenOptions));
    7278
    7379static cl::opt<unsigned, true> BufferSegmentsOption("buffer-segments", cl::location(BufferSegments), cl::init(1),
     
    7985
    8086
    81 static cl::opt<bool, true> segmentPipelineParallelOption("enable-segment-pipeline-parallel", cl::location(SegmentPipelineParallel),
     87static cl::opt<bool, true> segmentPipelineParallelOption("enable-segment-pipeline-parallel", cl::location(SegmentPipelineParallel), cl::init(false),
    8288                                                         cl::desc("Enable multithreading with segment pipeline parallelism."), cl::cat(CodeGenOptions));
    8389
     
    161167}
    162168
    163 }
    164169#if LLVM_VERSION_INTEGER < LLVM_VERSION_CODE(6, 0, 0)
    165170void printParabixVersion () {
     
    177182    cl::AddExtraVersionPrinter(&printParabixVersion);
    178183}
     184
     185}
Note: See TracChangeset for help on using the changeset viewer.