//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Creates the kernel. </summary> /// /// <seealso cref="M:KelpNet.Common.Functions.IParallelizable.CreateKernel()"/> //////////////////////////////////////////////////////////////////////////////////////////////////// public void CreateKernel() { if (GpuEnable) { ForwardKernel = Weaver.CreateProgram(Weaver.GetKernelSource(FUNCTION_NAME)).CreateKernel("MaxPoolingForward"); } }
public void CreateKernel() { string kernelSource = Weaver.GetKernelSource(FUNCTION_NAME); ComputeProgram program = Weaver.CreateProgram(kernelSource); ForwardKernel = program.CreateKernel("DropoutForward"); BackwardKernel = program.CreateKernel("DropoutBackward"); }
public void CreateKernel() { string kernelSource = this.ActivateFunctionString + this.ActivateKernelString; ComputeProgram program = Weaver.CreateProgram(kernelSource); this.ForwardKernel = program.CreateKernel(this.ForwardKernelName); this.BackwardKernel = program.CreateKernel(this.BackwardKernelName); }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Creates the kernel. </summary> /// /// <seealso cref="M:KelpNet.Common.Functions.IParallelizable.CreateKernel()"/> //////////////////////////////////////////////////////////////////////////////////////////////////// public void CreateKernel() { if (GpuEnable) { string kernelSource = ActivateFunctionString + ActivateKernelString; ComputeProgram program = Weaver.CreateProgram(kernelSource); ForwardKernel = program?.CreateKernel(ForwardKernelName); BackwardKernel = program?.CreateKernel(BackwardKernelName); } }
public void CreateKernel() { string kernelSource = KernelString; if (this.Activator != null) { kernelSource = this.Activator.ActivateFunctionString + KernelString; } ComputeProgram program = Weaver.CreateProgram(kernelSource); this.ForwardKernel = program.CreateKernel(this.ForwardKernelName); BackwardgWKernel = program.CreateKernel(BackwardgWKernelName); BackwardgXKernel = program.CreateKernel(BackwardgXKernelName); }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Creates the kernel. </summary> /// /// <seealso cref="M:KelpNet.Common.Functions.IParallelizable.CreateKernel()"/> //////////////////////////////////////////////////////////////////////////////////////////////////// public void CreateKernel() { if (GpuEnable) { string kernelSource = KernelString; if (Activator != null) { kernelSource = Activator.ActivateFunctionString + KernelString; } ComputeProgram program = Weaver.CreateProgram(kernelSource); ForwardKernel = program?.CreateKernel(ForwardKernelName); BackwardgWKernel = program?.CreateKernel(BackwardgWKernelName); BackwardgXKernel = program?.CreateKernel(BackwardgXKernelName); } }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Creates the kernel. </summary> /// /// <seealso cref="M:KelpNet.Common.Functions.IParallelizable.CreateKernel()"/> //////////////////////////////////////////////////////////////////////////////////////////////////// public void CreateKernel() { if (GpuEnable) { string kernelSource = KernelString; if (Activator != null) { kernelSource = Activator.ActivateFunctionString + KernelString; } if (Verbose) { RILogManager.Default?.SendDebug("CreateKernel -> KernelSource is " + kernelSource); } ComputeProgram program = Weaver.CreateProgram(kernelSource); ForwardKernel = program?.CreateKernel(ForwardKernelName); BackwardgWKernel = program?.CreateKernel(BackwardgWKernelName); BackwardgXKernel = program?.CreateKernel(BackwardgXKernelName); } }