Example #1
0
        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();
        }
Example #2
0
        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();
        }