Comments (9)
Can you try to create a very tiny test case, eg use the examples in the test/cocl folder as a basis, so I can reproduce the issue on my own machine?
from coriander.
Oh, you mean, you are calling new
inside the kernel?
from coriander.
Oh, you mean, you are calling new inside the kernel?
Yes, new
and delete
operators are called from inside the kernel
from coriander.
Oh wow. This is new information for me :-) . A very simple test case I can use would be good though. I doubt I'm going to implement this any time soon. But depends. As far as how to implement it ....
it could be possible actually. This would tie into the new virtual memory management that's sort of evolving. Basically, we'd allocate one gi-normous gpu buffer right at the start, from the hostside, inside coriander, and then just dole out little bites of this when people do cudaMalloc
etc hostside. We could then pass this single buffer into kernels, and dole out bits of that to the kernel itself.
Well... hmmm... yeah... that should work. We already started to handle virtual memory device-side,
coriander/src/kernel_dumper.cpp
Lines 178 to 188 in 31739d9
struct GlobalVars {
local int *scratch;
global char *clmem0;
unsigned long clmem_vmem_offset0;
};
inline global float *getGlobalPointer(__vmem__ unsigned long vmemloc, const struct GlobalVars* const globalVars) {
return (global float *)(globalVars->clmem0 + vmemloc - globalVars->clmem_vmem_offset0);
}
What is your use-case? To what extent can you work around this issue for now?
from coriander.
The use case requires allocating and de-allocating memory on the fly and in parallel, though I'll have to estimate the effort to work around the issue for now.
As for a test case I've taken a sample from the CUDA samples and tweaked it. There is another issue I forgot to bring up, when trying to allocate the allocation limit for a thread, the following error is thrown:
error: use of undeclared identifier
'cudaLimitMallocHeapSize'
cudaThreadSetLimit(cudaLimitMallocHeapSize, 128 * (1 << 20));
I've commented it out so you can see the runtime error
newdelete.tar.gz
from coriander.
from coriander.
from coriander.
from coriander.
We can store the vmem table at the start of the ginormous buffer, in global memory.
I imagine it would be possible to allocate a certain size, though support for the following function should be considered too
cudaThreadSetLimit(cudaLimitMallocHeapSize, <value>);
How long would it take to have this implemented in Coriander? I ask this because the current project I'm porting has a lot of intertwining dependencies on new
and delete
, and it would take a long time just to work around these dependencies.
from coriander.
Related Issues (20)
- cocl_py cuda_sample.cu dont work HOT 3
- when run "make -j 8 tests", something went wrong,seems like the "PIE object" problem. HOT 5
- How much work would it be to update to OpenCL 3.0/Cuda 12...cuda has always been back wards compatable HOT 1
- CMake issues
- Cython Integration
- i.MX8M Vivante GPU not working (Sorry I messed up, delete this)
- i.MX8M Vivante GPU Not Working HOT 1
- MacOS installation error [Errno 2] No such file or directory HOT 3
- tests compilation problem HOT 1
- run install and get error HOT 1
- I'm extremely impressed by this project. HOT 2
- questions about cuda api HOT 1
- Windows installation HOT 1
- help with make run-tests HOT 1
- Issue installing on MacOS10.15.5 HOT 2
- Question about generating an executable with multiple source files HOT 1
- Success compiling and running cuda_example.cu on Apple M1 Big sur HOT 1
- diffs to compile for clang 9
- documenting fix for clang error: reference to host function from device HOT 1
- update on compiling with big sure and clang11: HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coriander.