Ignore:
Timestamp:
Apr 5, 2017, 11:47:54 AM (2 years ago)
Author:
cameron
Message:

Kernel signatures for object cache

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/kernel.h

    r5391 r5392  
    2828public:
    2929   
     30    // Kernel Signatures and Module IDs
     31    //
     32    // A kernel signature uniquely identifies a kernel and its full functionality.
     33    // In the event that a particular kernel instance is to be generated and compiled
     34    // to produce object code, and we have a cached kernel object code instance with
     35    // the same signature and targetting the same IDISA architecture, then the cached
     36    // object code may safely be used to avoid recompilation.
     37    //
     38    // A kernel signature is a byte string of arbitrary length.
     39    //
     40    // Kernel developers should take responsibility for designing appropriate signature
     41    // mechanisms that are short, inexpensive to compute and guarantee uniqueness
     42    // based on the semantics of the kernel. 
     43    //
     44    // If no other mechanism is available, the default generateKernelSignature() method
     45    // uses the full LLVM IR (before optimization) of the kernel instance.
     46    //
     47    // A kernel Module ID is short string that is used as a name for a particular kernel
     48    // instance.  Kernel Module IDs are used to look up and retrieve cached kernel instances
     49    // and so should be highly likely to uniquely identify a kernel instance.
     50    //
     51    // The ideal case is that a kernel Module ID serves as a full kernel signature thus
     52    // guaranteeing uniqueness.  In this case, the moduleIDisUnique() method
     53    // should return true.
     54    //
     55   
     56    // Can the module ID itself serve as the unique signature?
     57    virtual bool moduleIDisSignature() {/* default */  return false;}
     58   
     59    virtual void generateKernelSignature(std::string & signature);
     60   
    3061    // Create a module stub for the kernel, populated only with its Module ID.     
    3162    //
     
    139170    }
    140171
    141     void prepareKernelSignature();
     172    void prepareStreamSetNameMap();
    142173
    143174    virtual void prepareKernel();
Note: See TracChangeset for help on using the changeset viewer.