public void SynchronizeAllStreams() { m_stopwatch.Start(); // (Synchronizing the whole context would take roughtly the same time.) foreach (var cudaStream in m_streamPool) { cudaStream.Synchronize(); } m_stopwatch.StopAndSometimesPrintStats(); }
public override void Execute() { CudaSyncHelper.Instance.OnStartExecute(Owner.LayerNumber); const int cycleCountThousands = 100; m_stopwatch.StartNewSegment($"Chewing {cycleCountThousands} thousand cycles."); m_chewDataKernel.SetupExecution(Owner.Input.Count); m_chewDataKernel.Run(0.25f, Owner.Input, Owner.Output, Owner.Input.Count, cycleCountThousands); m_stopwatch.StopAndSometimesPrintStats(); }