Comments (3)
I'll try this out tomorrow when I am at work; I had holiday today. The only references to CL_MAP_WRITE_INVALIDATE_REGION are in coo2csr; is that what you are executing? I don't understand why that would fail; are you testing on an nvidia platform maybe? Looks like that flag was added in cl1.2. It's use is exactly like CL_MAP_WRITE, except that it can be faster. Also, I only write that memory, I never read from it, so the problem has to come from the memory not being unmapped correctly.
from clsparse.
Yes it is that code. I did not study the code deeply but originally your code is mapping the same buffer for reading and writing.
clMemRAII< cl_float > rCooValues( control->queue( ), pCooMatx->values );
...
cl_float* fCooValues = rCooValues.clMapMem( CL_TRUE, CL_MAP_READ, pCooMatx->valOffset( ), pCooMatx->nnz );
...
cl_float* fCsrValues = rCooValues.clMapMem( CL_TRUE, CL_MAP_WRITE_INVALIDATE_REGION, pCsrMatx->valOffset( ), pCsrMatx->nnz );
Similarly you are mapping coo colindices into iCooColIndices (for reading) and iCsrColIndices for wiriting. Indeed the difference between csr and coo matrix lays in the rows but for me that code is making the troubles. At least it is working when i change to the state which I think is correct:
cl_float* fCooValues = rCooValues.clMapMem( CL_TRUE, CL_MAP_READ, pCooMatx->valOffset( ), pCooMatx->nnz );
cl_int* iCooColIndices = rCooColIndices.clMapMem( CL_TRUE, CL_MAP_READ, pCooMatx->colIndOffset( ), pCooMatx->nnz );
cl_int* iCooRowIndices = rCooRowIndices.clMapMem( CL_TRUE, CL_MAP_READ, pCooMatx->rowOffOffset( ), pCooMatx->nnz );
cl_float* fCsrValues = rCsrValues.clMapMem( CL_TRUE, CL_MAP_WRITE, pCsrMatx->valOffset( ), pCsrMatx->nnz );
cl_int* iCsrColIndices = rCsrColIndices.clMapMem( CL_TRUE, pCsrMatx, pCsrMatx->colIndOffset( ), pCsrMatx->nnz );
cl_int* iCsrRowOffsets = rCsrRowOffsets.clMapMem( CL_TRUE, CL_MAP_WRITE, pCsrMatx->rowOffOffset( ), pCsrMatx->m + 1 );
from clsparse.
This was fixed in PR #44
from clsparse.
Related Issues (20)
- make install not working HOT 2
- Testing depends on remote content fetching HOT 6
- Possible overlinkage HOT 2
- Missing implementations of clsparseScoomv and clsparseDcoomv HOT 4
- "Kernel not found in cache" for SPMV sample HOT 1
- C# Wrapper HOT 5
- Wrong system size checks? HOT 4
- clsparseScoo2csr crashes for small matrix sizes
- Documentation does not make clear when output matrices are allocated by the library and when they have to be supplied by the user
- Probable bug in clsparseScsrmm() with cldenseMatrix HOT 2
- Not building on OS X High Sierra
- Segfault when reading 0-based matrix
- source-provider.cpp: No such file or directory HOT 1
- How to transpose?
- Can not link shared library HOT 1
- Segmentation fault when create cl_mem in sample_spmv
- CSR matrix format stores in a file
- compile error
- Example Interface with Eigen SparseMatrix
- Build fail at mm-reader.cpp
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 clsparse.