Ignore:
Timestamp:
May 19, 2017, 12:58:48 PM (2 years ago)
Author:
lindanl
Message:

Add NVPTX driver.

File:
1 edited

Legend:

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

    r5454 r5458  
    2929#include <sys/stat.h>
    3030#include <llvm/IR/Verifier.h>
     31#include <toolchain/NVPTXDriver.cpp>
    3132//#include <toolchain/workqueue.h>
    3233
     
    9899static cl::opt<bool> segmentPipelineParallel("enable-segment-pipeline-parallel", cl::desc("Enable multithreading with segment pipeline parallelism."), cl::cat(CodeGenOptions));
    99100
     101bool NVPTX;
     102int GroupNum;
     103static cl::opt<bool> USENVPTX("NVPTX", cl::desc("Run on GPU only."), cl::init(false));
     104static cl::opt<int, true> GroupNumOption("group-num", cl::location(GroupNum), cl::desc("NUmber of groups declared on GPU"), cl::value_desc("positive integer"), cl::init(256));
     105
     106}
     107
     108void setNVPTXOption(){
     109    codegen::NVPTX = codegen::USENVPTX;
     110    if(codegen::NVPTX){
     111#ifndef CUDA_ENABLED
     112    std::cerr << "CUDA compiler is not supported.\n";
     113    exit(-1);
     114#endif
     115    }
    100116}
    101117
Note: See TracChangeset for help on using the changeset viewer.