Beispiel #1
0
      void FPGAConfig::apply()
      {
         verbose0( "Initializing FPGA support component" );

         if ( _disableFPGA ) {
            _numAccelerators = 0; //system won't instanciate accelerators if count=0
         } else if ( _numAccelerators < 0 ) {
            /* if not given, assume we are using one accelerator
             * We should get the number of accelerators on the system
             * and use it as a default
             */
            _numAccelerators = 1;
         } else if ( _numAccelerators == 0 ) {
             _disableFPGA = true;
         }

         if (_numAccelerators > _maxAccelerators) {
             warning0( "The number of accelerators is greater then the accelerators in the system. Using "
                     << _maxAccelerators << " accelerators" );
             _numAccelerators = _maxAccelerators;
         }

         if ( _numFPGAThreads < 0 ) {
            warning0( "Number of fpga threads cannot be negative. Using one thread per accelerator" );
            _numFPGAThreads = _numAccelerators;
         } else if ( _numFPGAThreads > _numAccelerators ) {
            warning0( "Number of helper is greater than the number of accelerators. Using one thread per accelerator" );
            _numFPGAThreads = _numAccelerators;
         }
         _idleSyncBurst = ( _idleSyncBurst < 0 ) ? _burst : _idleSyncBurst;

      }
Beispiel #2
0
void GPUConfig::printConfiguration()
{
   verbose0( "--- GPUDD configuration ---" );
   verbose0( "  Number of GPU's: " << _numGPUs );
   verbose0( "  GPU cache policy: " << ( _cachePolicy == System::WRITE_THROUGH ? "write-through" : "write-back" ) );
   verbose0( "  Prefetching: " << _numPrefetch );
   verbose0( "  Concurrent kernel execution: " << ( _concurrentExec ? "Enabled" : "Disabled" ) );
   verbose0( "  Overlapping: " << ( _overlap ? "Enabled" : "Disabled" ) );
   verbose0( "  Overlapping inputs: " << ( _overlapInputs ? "Enabled" : "Disabled" ) );
   verbose0( "  Overlapping outputs: " << ( _overlapOutputs ? "Enabled" : "Disabled" ) );
   verbose0( "  Transfer mode: " << ( _transferMode == NANOS_GPU_TRANSFER_NORMAL ? "Sync" : "Async" ) );
   if ( _maxGPUMemory != 0 ) {
      if ( _maxGPUMemory > 100 ) {
         verbose0( "  Limited memory: Enabled: " << GPUUtils::bytesToHumanReadable( _maxGPUMemory ) );
      } else {
         verbose0( "  Limited memory: Enabled: " << _maxGPUMemory << "% of the total device memory" );
      }
   }
   else {
      verbose0( "  Limited memory: Disabled" );
   }
   verbose0( "  Allocate pinned buffers: " << ( _allocatePinnedBuffers ? "Enabled" : "Disabled" ) );
   verbose0( "  GPU warm up: " << ( _gpuWarmup ? "Enabled" : "Disabled" ) );
   verbose0( "  CUBLAS initialization: " << ( _initCublas ? "Enabled" : "Disabled" ) );

   verbose0( "--- end of GPUDD configuration ---" );
}