Ignore:
Timestamp:
Apr 15, 2017, 4:42:33 PM (2 years ago)
Author:
nmedfort
Message:

First attempt to allow Kernels to wait for consumers to finish processing before performing a realloc.

File:
1 edited

Legend:

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

    r5407 r5408  
    2727#include <kernels/object_cache.h>
    2828#include <kernels/pipeline.h>
    29 #include <kernels/interface.h>
    3029#include <kernels/kernel.h>
    3130#ifdef CUDA_ENABLED
     
    219218
    220219void ParabixDriver::generatePipelineIR() {
    221     for (auto & kb : mKernelList) {
    222         kb->addKernelDeclarations(mMainModule);
     220    // note: instantiation of all kernels must occur prior to initialization
     221    for (const auto & k : mKernelList) {
     222        k->addKernelDeclarations(mMainModule);
     223    }
     224    for (const auto & k : mKernelList) {
     225        k->createInstance();
     226    }
     227    for (const auto & k : mKernelList) {
     228        k->initializeInstance();
    223229    }
    224230    if (codegen::pipelineParallel) {
Note: See TracChangeset for help on using the changeset viewer.