1

Topic: about GPU on C# under ! Why so it is not enough?

Here I, the typical student, it is necessary for me to count PageRank for one retrieval request about text basis how me it to make on C#? 1) I open github and I search "for a method " - there are three thousand repositories in all languages, 74 on C# (here maniacs - another's code we do not read, always we write the) 2) the iterated method  as retrieval request at me specific pages it affects a little, I want to count at once precisely, what for to me iterations is not necessary to me? 3) there is an accelerated multiplication which faster ( complexity is less), well it was difficult to make library once? What to do?

2

Re: about GPU on C# under ! Why so it is not enough?

Hello, Ejnstok Fajr, you wrote: > What to do? To create 75th repository and to write article

3

Re: about GPU on C# under ! Why so it is not enough?

Hello, Ejnstok Fajr, you wrote: > What to do? In GPU there is no stack - C# without a stack most likely will not work [Update]: At least when I looked on CUDA 4th versions of a stack was not. Here as happens - functions and local variables are, and the stack alas is not present.

4

Re: about GPU on C# under ! Why so it is not enough?

Hello, VladCore, you wrote: VC> In GPU there is no stack - C# without a stack most likely will not work They make a stack on local memory, the objects created through new will allocate in global memory. Also promise that in the future at all of them it will be optimized automatically under architecture of that videocard on which all is fulfilled. Let while brakes, but years through 15...

5

Re: about GPU on C# under ! Why so it is not enough?

Hello, Ejnstok Fajr, you wrote: > Here I, the typical student, it is necessary for me to count PageRank for one retrieval request about text basis how me it to make on C#? At what here GPU? > 1) I open github and I search "for a method " - there are three thousand repositories in all languages, 74 on C# (here maniacs - another's code we do not read, always we write the) Correctly, github for writers, instead of readers. > 2) the iterated method  as retrieval request at me specific pages it affects a little, I want to count at once precisely, what for to me iterations is not necessary to me? All of us still about pagerank? For it there is an exact method of count? > 3) there is an accelerated multiplication which faster ( complexity is less), well it was difficult to make library once? So made, even two https://cudafy.codeplex.com/http://www.aleagpu.com/ There examples about matrix multiplication are. > What to do? To google better. Unfortunately among "information noise" in the form of pythons and nodejs it is difficult to find suitable  on.NET.

6

Re: about GPU on C# under ! Why so it is not enough?

Hello, VladCore, you wrote: VC> Hello, Ejnstok Fajr, you wrote: >> What to do? VC> in GPU there is no stack - C# without a stack the Author most likely will not work asks about matrix multiplication, and to it about a stack answer. Talk mute with the deaf. Any language "without a stack most likely will not work" because in all languages there are subroutines and call stack. But suddenly many languages are compiled in the code for the videocard.

7

Re: about GPU on C# under ! Why so it is not enough?

Hello, gandjustas, you wrote: G> the Author asks about matrix multiplication, and to it about a stack answer. Talk mute with the deaf. . It is talk to that who is not able to read title - "about GPU on C# under ".

8

Re: about GPU on C# under ! Why so it is not enough?

Hello, Nuzhny, you wrote: N> Hello, VladCore, you wrote: VC>> In GPU there is no stack - C# without a stack most likely will not work N> They make a stack on local memory, the objects created through new will allocate in global memory. Also promise that in the future at all of them it will be optimized automatically under architecture of that videocard on which all is fulfilled. Let while brakes, but years through 15... I do not know that such local memory. In terminology CUDA is shared memory. It likely it also is. It is not enough of it. On mine  it is less than it than under the code And how they I will be  if shared/local memory ends? Copy in global gpu memory?

9

Re: about GPU on C# under ! Why so it is not enough?

G> So made, even two G> https://cudafy.codeplex.com/And this Cudafy is able to do SPIR? (Me it seems that is not present. Because I looked SPIR on source codes Cudafy and did not find.) now at me the new plan: - I any more do not want to use OpenCL - I want to use OpenGL Compute Shaders and GLX extension for x11 protocol

10

Re: about GPU on C# under ! Why so it is not enough?

Hello, gandjustas, you wrote: G> Any language "without a stack most likely will not work" because in all languages there are subroutines and call stack. Imagine, in due time there was even a machine without a stack. And not any, and IBM-360/370. And subroutines then were, and call stack, and here the hardware stack there was not. Truth Exists a beautiful legend that the principal who has eliminated stack architecture from a construction of computers of firm "IBM", in a consequence has been banished"in intrafirm analog of Siberia. http://files.libedu.ru/6wo4txjsylurprcq … utera_.txt

11

Re: about GPU on C# under ! Why so it is not enough?

Hello, Ejnstok Fajr, you wrote: > Here I, the typical student, it is necessary for me to count PageRank for one retrieval request about text basis how me it to make on C#? In what the task to make count, to make on C#, or to make on GPU? This test job any? > 1) I open github and I search "for a method " - there are three thousand repositories in all languages, 74 on C# (here maniacs - another's code we do not read, always we write the) And why you think, what they did not read? > 2) the iterated method  as retrieval request at me specific pages it affects a little, I want to count at once precisely, what for to me iterations is not necessary to me? It is thought, the most simple method, without GPU is necessary to you. If the task in count. If there is a task to make on C# and GPU see more low. > 3) there is an accelerated multiplication which faster ( complexity is less), well it was difficult to make library once? Library for matrix multiplication? Them should be enough. > What to do? Under GPU on C# do not write. The computing code (kernel) is written separately on . Language (any dialect of a C - OpenCL or UDA, is it seems even the Fortran variant). It is launched for example from C#, the library  CUDA is necessary or OpenCL, Google here helps. Is still OpenACC is like OpenMP, but the pieces of the code marked with summaries, are fulfilled on GPU. It is necessary to write all code on a C.

12

Re: about GPU on C# under ! Why so it is not enough?

Hello, ins-omnia, you wrote: >> What to do? IO> under GPU on C# do not write. The computing code (kernel) is written separately on . Language (any dialect of a C - OpenCL or UDA, is it seems even the Fortran variant). It is launched for example from C#, the library  CUDA is necessary or OpenCL, Google here helps. IO> is still OpenACC is like OpenMP, but the pieces of the code marked with summaries, are fulfilled on GPU. It is necessary to write all code on a C. Cudafy is able to alter # on GPU. It is adjusted painfully, and generally the perversion, but then works.

13

Re: about GPU on C# under ! Why so it is not enough?

Hello, Ejnstok Fajr, you wrote: > Here I, the typical student, it is necessary for me to count PageRank for one retrieval request about text basis how me it to make on C#? > 1) I open github and I search "for a method " - there are three thousand repositories in all languages, 74 on C# (here maniacs - another's code we do not read, always we write the) > 2) the iterated method  as retrieval request at me specific pages it affects a little, I want to count at once precisely, what for to me iterations is not necessary to me? > 3) there is an accelerated multiplication which faster ( complexity is less), well it was difficult to make library once? > What to do? 1. A method  only in 95th year invented as optimally : https://www.sciencedirect.com/science/a … 219500017S It is necessary to search separately for implementation under CUDA - at it a multithreading especial. And in article   algorithm. 2. That  on C# under CUDA for a long time it is written that it is possible to write: https://github.com/kunzmi/managedCuda/the project old enough also endured some versions CUDA At me from the first on   a primitive example, truth not gauss. Code GPU: extern "C" {__ global __ void test (float * data) {float a = data [0]; float b = data [1]; float c = data [2]; data [0] = max (a, max (b, c));} } A call from C# static void Test1 () {using (CudaContext ctx = new CudaContext ()) {var apiVersion = ctx. GetAPIVersionOfCurrentContext (); var ccVer = ctx. GetDeviceComputeCapability (); var deviceName = ctx. GetDeviceName (); var freeGpuMemory = Math. Round ((long) ctx. GetFreeDeviceMemorySize () / 1024m / 1024m, 1); var totalGpuMemory = Math. Round ((long) ctx. GetTotalDeviceMemorySize () / 1024m / 1024m, 1); Console. WriteLine ("API Version: {0} Compute Capability: {1} Device: {2} Free GPU Memory: {3} Mb Total GPU Memory: {4} Mb", apiVersion, ccVer, deviceName, freeGpuMemory, totalGpuMemory); CudaDeviceVariable <float> d = new CudaDeviceVariable <float> (3); d [0] =-5; d [1] = 13; d [2] = 555; var archSuffix = IntPtr. Size * 8; string ilGpuModuleFileName = string. Format ("test - {0}.ptx", archSuffix); CUmodule module = ctx. LoadModulePTX (ilGpuModuleFileName); CudaKernel kernel = new CudaKernel ("test", module, ctx) {GridDimensions = new dim3 (1, 1), BlockDimensions = new dim3 (1, 1)}; kernel. Run (d. DevicePointer); Console. WriteLine ("Launch result: Max is" + d [0]);} On  c NVIDIA GK104GL [GRID K520] (rev a1) this code deduces API Version: 3.20 Compute Capability: 3.0 Device: GRID K520 Free GPU Memory: 3989 Mb Total GPU Memory: 4036.5 Mb Launch result: Max is 555 So the problem only in especial  to architecture of a multithreading on GPU, and  it in C# is not and it is difficult. P.S. I write about CUDA only on two , at me AMD was never, and in clouds it is possible to take only NVidia