Skip to content
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

Fix node v12.0.0 errors, update to nan v2.13 #69

Merged
merged 38 commits into from
Nov 23, 2019

Conversation

trxcllnt
Copy link
Collaborator

@trxcllnt trxcllnt commented Apr 26, 2019

Hi @mikeseven! Here's a PR with updates to make everything compile in node v12.0.0. It includes a few small fixes (like 3e54df5), and I updated a bunch of tests where appropriate. I've tested with the Intel Core i7 8700 and nvidia GTX 1070s in my laptop, but will also be testing on the V100s in a little bit.

It also adds a feature to return Uint8Arrays of the program binaries from cl.getProgramInfo() (test here). I updated the NoCLWrapper::Unwrap method to call NewInstance if the Local<Value> is a Uint8Array. This was the easiest way I found to make cl.createProgramFromBinary() work when it's passed a list of Uint8Arrays.

Look it over and let me know what you think. I still need to update our other dependencies for node 12 so I haven't tried in production settings yet, but I'll update this PR if I run into anything. Once this looks good and is merged, do you think we could do a new release of node-opencl to npm? We've been referencing my fork via a git hash, but it'd be great to have an official v0.5.0 out on npm.

mikeseven and others added 30 commits November 23, 2017 22:03
* return compiled program from clGetProgramInfo(cl.PROGRAM_BINARIES)
* detect if a buffer is being unwrapped inside NoCLWrapper::Unwrap, and reinterpret_cast into the type if so
* only pass programs with size > 0 to clCreateProgramFromBinary for nvidia
@lu4
Copy link
Contributor

lu4 commented Jun 5, 2019

Thank you very much!

@trxcllnt
Copy link
Collaborator Author

trxcllnt commented Jun 5, 2019

@lu4 no problem! heads up, I learned after submitting this PR that the ToChecked() method is a fairly new alias of FromJust(), so this PR won't work on older versions of node until I find/replace all those calls.

@lu4
Copy link
Contributor

lu4 commented Jun 5, 2019

Hey @trxcllnt But I see that the last commit already contains mentioned fix from you here c64da8d ? However backward compatibility is not an issue for me.

Is this repo live at all?

All this work in this PR is precious but is invisible to everyone, such a waste. I've incidentally dropped in here and was happy to find it. Maybe it's time for a new maintainer or even project?

@trxcllnt
Copy link
Collaborator Author

trxcllnt commented Jun 5, 2019

@lu4 oh, you're right! I guess I did the find/replace when I first figured it out, then forgotten I did it. As to the other thing, you'd have to ask @mikeseven. I won't be able to contribute much further from here on out, but I'd be happy to help with any changes necessary to get this PR merged.

@lu4
Copy link
Contributor

lu4 commented Jun 5, 2019

Since the maintainer is not active I'll probably try to somehow fork or spin-off new project based on this work (as a temporary solution) I'll try to include all the PRs suggested by the community as per my understanding of BSD-3 license ( https://tldrlegal.com/license/bsd-3-clause-license-(revised) ) it should be fine

@lu4
Copy link
Contributor

lu4 commented Jun 5, 2019

Also having a TypeScript support would be great

@lu4
Copy link
Contributor

lu4 commented Jun 6, 2019

@trxcllnt JFYI, I've noticed that the contents of some #ifndef CL_VERSION_2_0 ... #endif were not covered with the fixes you've introduced. Currently I see just one file having this problem: sampler.cpp

@lu4
Copy link
Contributor

lu4 commented Jun 6, 2019

@trxcllnt I can create PR for your fork?

@lu4
Copy link
Contributor

lu4 commented Jun 6, 2019

Here it is: trxcllnt#1

trxcllnt and others added 5 commits June 5, 2019 17:47
Add missing Nan support, for sampler.cpp, less than OpencCL version 2
* dev/fix-tests:
  fix(tests)
  Based on mikeseven@3603302
  Minor code quality improvements
@trxcllnt trxcllnt mentioned this pull request Nov 4, 2019
4 tasks
@lmeyerov
Copy link
Collaborator

lmeyerov commented Nov 4, 2019

Extra waiting commit: trxcllnt#3

We're kind of stuck now. We'll maintain http://github.com/graphistry/node-opencl#next as our node 12 prod and I'll ping Mike about what's happening here.

@lmeyerov lmeyerov mentioned this pull request Nov 5, 2019
@lmeyerov
Copy link
Collaborator

Great, I have commit access now -- merging. (Already been using in prod for graphistry.)

@lmeyerov lmeyerov merged commit cb5abaa into mikeseven:master Nov 23, 2019
@lmeyerov
Copy link
Collaborator

NOTE: Asking Mike on how to push a version update to npm, so almost there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants