-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiply two complex matrices fails (some time) #4796
Comments
I get the same thing. @JeffBezanson @StefanKarpinski We should take a look and see if this is relevant for 0.2 |
If this has never come up before, I have a hard time believing that it's high enough priority to go in 0.2. |
If @JeffBezanson can take a quick look, that would be nice. I agree that it is not unsettling enough to hold the release. |
For one thing, even if it does get fixed you should never do the version that currently fails. |
@wenxgwen, if my last comment seems at all mysterious to you, see http://docs.julialang.org/en/latest/manual/faq/#how-do-abstract-or-ambiguous-fields-in-types-interact-with-the-compiler |
I'm pretty sure the difference is in the type of the output array. Generic matmul does |
"never" seems a bit strong. I'm sure there's situations where you don't want that extra type parameter. |
The issues with |
I'm quite disturbed by this bug. Creating |
@jiahao @timholy |
@wenxgwen It is not possible to generate efficient code with just The real issue here is that arrays of |
Maybe a rename is in order? Like: |
@wenxgwen, I'll echo what @jiahao said, what you're asking for is simply not possible. It's not a language thing, it's a CPU architecture and assembly instruction thing. You have to compile it down to something that uses the hardware to do the computations (there's a reason CPUs contain FPUs...), and you can only do that when the types are known concretely. @StefanKarpinski, perhaps "never" was too strong, but certainly this should be an extreme corner case. I'm mostly in favor of @ivarne's suggestion, it would definitely circumvent the new user problem. One downside is that it introduces a slight asymmetry between the naming schemes for real and complex (there's no "alias" for |
To be consistent with We already have |
I'm also in favor of @ivarne's suggestion. For example we can use ComplexType and RealType to mean generic abstract type and use Complex and Real to mean Complex(128) and Float{64}. This might be more user friendly. |
What about making |
Error for abstract types are a very good idea. Same for I made an issue for this in #4808 |
Here is the julia session and the code:
The code test.jl :
Xiao-Gang
[pao: formatting; GitHub uses triple-backticks for code blocks]
The text was updated successfully, but these errors were encountered: