public void SetAlgorithmPerformance(int index, AlgorithmDescriptor algoDesc, cudnnStatus status, float time, SizeT memory) { res = CudaDNNNativeMethods.cudnnSetAlgorithmPerformance(_perfs[index], algoDesc.Desc, status, time, memory); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetAlgorithmPerformance", res)); if (res != cudnnStatus.Success) { throw new CudaDNNException(res); } }
public void CopyAlgorithmDescriptor(AlgorithmDescriptor dest) { res = CudaDNNNativeMethods.cudnnCopyAlgorithmDescriptor(_desc, dest.Desc); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCopyAlgorithmDescriptor", res)); if (res != cudnnStatus.Success) { throw new CudaDNNException(res); } }
public void GetAlgorithmPerformance(int index, ref AlgorithmDescriptor algoDesc, ref cudnnStatus status, ref float time, ref SizeT memory) { cudnnAlgorithmDescriptor descTemp = new cudnnAlgorithmDescriptor(); res = CudaDNNNativeMethods.cudnnGetAlgorithmPerformance(_perfs[index], ref descTemp, ref status, ref time, ref memory); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetAlgorithmPerformance", res)); if (res != cudnnStatus.Success) { throw new CudaDNNException(res); } algoDesc = new AlgorithmDescriptor(descTemp); }