Comments (3)
Hello, I'm not a Chapel expert but I think I could help you to workaround this issue.
In my understanding, dot
calls the private _matmatMult
method, itself calling hasNonStridedIndices(Adom)
. The compiler error you get is due to a mismatch in hasNonStridedIndices
argument (Adom
). It must be a domain(2)
, but matA[1, .., ..].domain.type
is an ArrayViewRankChangeDom
(due to an internal conversion I guess).
One workaround that could help you is to use temporary variables/constants and explicitly specify their domain (otherwise it is assigned to ArrayViewRankChangeDom
also):
use LinearAlgebra;
var matA : [1..3, 1..3, 1..3] real;
var matB : [1..3, 1..3, 1..3] real;
const matC : [1..3, 1..3] real = matA[1, .., ..];
const matD : [1..3, 1..3] real = matB[1, .., ..];
writeln(dot(matC, matD));
Note for potential fix: One solution could be to check the type of Adom
in hasNonStridedIndices
, and if not domain(2)
, perform the explicit cast ArrayViewRankChangeDom:domain(2)
.
from chapel.
@redhatturtle : Thanks for filing this, and sorry for the lack of responses from the Chapel dev team until now. We were working on getting 1.32 release notes out the door and fell behind on user issues a bit as a result. And thanks to @Guillaume-Helbecque for helping out while we were distracted.
I've got a modest fix to the hasNonStridedIndices()
utility being used in this code path to make it rank-neutral, which seems as though it gets the cases in the OP working as expected, and I believe should enable other cases as well (such as multiplying rank-preserving slice operations). I do need to do more testing on it still before merging, but if you want to give it a look and see whether it works for you, I'd be curious for any feedback: #23737
from chapel.
@redhatturtle : Just noting that this has now been merged. Thanks again for reporting it, and please let me know if it does not resolve the original problem in your own code (rather than just this reproducer).
from chapel.
Related Issues (20)
- Missing deprecation warnings for converting `owned` to `shared`
- Internal error when building Chapel code with HIP module loaded HOT 7
- Apparent bug in readBinary() (for sufficiently large files? sufficiently large offsets within files? array slice reads?) HOT 3
- GPU: Initializers with promoted expressions don't get GPUized. HOT 3
- assertOnGpu fails when applied to `foreach` with custom iterator HOT 2
- Discussion on forall intents
- What to do with the empty regex initializer? HOT 4
- GPU Kernels in Standard Modules cause segfaults or internal errors
- Restore support for casting expressions to strings?
- forall reductions fail silently for GPU HOT 1
- dyno: incremental re-scope resolution causes recursive query when standard modules are enabled HOT 1
- Using `CHPL_GPU=cpu` with the gnu compiler gives an attribute warning HOT 3
- Stabilizing Associative Domains and Arrays HOT 1
- stdin/stdout/stderr store the dummy locale rather than locale 0 HOT 1
- Improve IO's bulk read/write performance when endianness is non-native HOT 2
- Clarify documentation around profiling based on user feedback HOT 1
- Add a note to the GPU technote about best practices for host profiling when using the GPU locale model HOT 3
- Add support for `-pg` to the LLVM back-end? HOT 1
- Capitalization / Naming of ioendian HOT 6
- Can Chapel code use a param to detect endianness?
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 chapel.