Open ecotner opened 3 years ago
Looks like your matrices are wrong...
Compare this
To this
You haven't used j
anywhere...
Where did you get the example code from? The readme or the website?
Thank you!
If you are not using the example on the website, try it out, it's slightly new.
Looks like your matrices are wrong... You haven't used
j
anywhere...
The matrices are not wrong; they are generated in exactly the same way as the snippet you posted (I might as well ask you why you haven't used x
anywhere).
Where did you get the example code from? The readme or the website?
From the README.md
on github. I was not aware of the website example, but it seems that it has the exact same problem.
The matrices are not wrong; they are generated in exactly the same way as the snippet you posted (I might as well ask you why you haven't used x anywhere).
Ok, lol. I did not realize that you defined a and b separately :sweat_smile:
but it seems that it has the exact same problem.
I never faced such an issue. Which version of gpu.js are you using?
I don't think there is an error in the code ¯\_(ツ)_/¯
I am using the version that is being returned by the CDN at https://cdn.jsdelivr.net/npm/gpu.js@latest/dist/gpu-browser.min.js, which appears to be 2.10.5
I don't think there is an error in the code ¯_(ツ)_/¯
Can you not reproduce the error? Follow this link to my implementation of the website example. Does it work for you?
I managed to reproduce, but couldn't find the error. The error message is also cryptic.
Ok, so does that mean you don't think this is worth fixing? @robertleeplummerjr do you think there is anything that can be done about this or should I close the issue?
For sure this is something that needs handled, I've just been very short on time. I'll see about looking into it this week.
A GIF or MEME to give some spice of the internet
What is wrong?
Running the introductory matrix multiplication example does not work on codepen.
Where does it happen?
In
gpu-browser.min.js
, when launching the kernel, it throws an error sayingUncaught Error: Unhandled function, couldn't find name on line 5, position 1: window.CP.shouldStopExecution(0)
. I have tried this on Firefox version 83.0 and Chrome 83.0.4103.61 and get the same error. My OS is Ubuntu 18.04 LTS. I did run the same script locally and it worked fine though, so the problem is specific to execution in codepen.How do we replicate the issue?
Go to this example and click "Run", then pull up the dev tools and look in the console. You'll see the error. I'll paste the code below as well just in case something happens to the link. I did some googling and it seems that codepen sometimes has troubles with loops, and sometimes changing things to work with array methods will fix things.
How important is this (1-5)?
Definitely low priority... 1? It would be nice for people who just want to try out
gpu.js
super quick but not go through installing it locally just to see if it's what they need. If fixing this would break other things or decrease performance, I totally understand. It also could potentially just be completely unresolvable unless codepen were to change the way they execute JS haha. Just thought I should bring this to your attentionExpected behavior (i.e. solution)
The demo should have run without error on codepen
Other Comments
Here's the code being run in the codepen example:
HTML:
CSS:
Javascript:
BTW, I also noticed that in your example scripts, you never define the matrices
a
andb
, so a simple copy/paste is not enough to get the examples running (hence why I have initialized them here).