On 03/22/2013 03:20 AM, Peter Colberg wrote: > Support for __local kernel arguments could probably be implemented > by manually partitioning a dynamically allocated shared memory block > into segments for each __local argument.
If there is no API for managing local memory directly in the CUDA library, The bufalloc that I implemented exactly for this purpose can be used. It keeps book of chunks in a larger allocated memory region. It is used for managing the memory for the TCE device drivers from the host side. It has a straightforward allocation scheme for allocating chunks of memory from a bigger chunk that is allocated only once. > For constant memory, the CUDA driver API provides a function > cuModuleGetGlobal() to get the pointer to a module-scope __constant > array. One or multiple such module-scope arrays could be initialised > with cuMemcpyDtoD at kernel execution to provide memory for buffers > passed as __constant arguments. Good. > I am skeptical of an NVPTX/CUDA device driver at this stage. > > The usability of this driver depends entirely on the quality of the > NVPTX backend. When serious problems arise with code generation, who > is to say that, once the term OpenCL is mentioned, the responsible > maintainers at NVIDIA with the knowledge to fix these issues won't > react with the same silence surrounding NVIDIA's OpenCL driver? I'm more optimistic than this. CUDA and OpenCL are so similar that code gen bugs in the latter should be reproducible with CUDA kernels. I will help reporting the possible bugs after the driver lands to pocl trunk as I have an (older) NVIDIA card to test with. Did you check the status of the NVPTX backend in LLVM trunk? As they have the backend in the LLVM upstream, I think the authors have made an implicit promise to maintain it and fix bugs if they arise. Otherwise it will get removed from LLVM sooner than later. E.g, the cellspu backend was now removed in 3.3 after it lost users and maintainers, and had open bugs. Keep up the good work, -- --Pekka ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
