-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
[FLINK-17795][example] Add MatrixVectorMul example #12398
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 78762a3 (Fri May 29 02:04:44 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating this PR @KarmaGYZ. The example looks good to me. I had a question concerning the limitations of JCuda
and the juggling of temp directories. Moreover, I would suggest to not include this example in flink-dist
. I believe that it is too specific for an example.
<exclusion> | ||
<groupId>org.jcuda</groupId> | ||
<artifactId>jcublas-natives</artifactId> | ||
</exclusion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Why can we exclude it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
...xamples-streaming/src/main/java/org/apache/flink/streaming/examples/gpu/MatrixVectorMul.java
Outdated
Show resolved
Hide resolved
...xamples-streaming/src/main/java/org/apache/flink/streaming/examples/gpu/MatrixVectorMul.java
Outdated
Show resolved
Hide resolved
...xamples-streaming/src/main/java/org/apache/flink/streaming/examples/gpu/MatrixVectorMul.java
Show resolved
Hide resolved
flink-examples/flink-examples-streaming/src/main/resources/add-jcuda-dependency.sh
Outdated
Show resolved
Hide resolved
I would like to hold off on merging this PR. There are some ongoing discussions related to CUDA in LEGAL-515/LEGAL-516, which make it difficult to nail down what the licensing situation actually looks like. While we aren't redistributing JCuda in the usual sense, we still offer a one-click retrieval service for users without providing additional legal information, which is effectively the same. |
@zentol do you think it would be good enough to remove |
@tillrohrmann That would probably be fine. The example itself isn't a problem since all native code is(?) contained in the |
Ok, then let's do it like this. We remove the |
@tillrohrmann I'm ok with it. |
@tillrohrmann Thanks for the review. PR updated according to the latest consensus. |
@KarmaGYZ Yes, this is only about the native code, since that is what is being compiled against the cuda headers. The linked jar only contains java code, and thus should be fine. |
@zentol Thanks for the explanation and help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing our comments @KarmaGYZ. LGTM. Merging this PR now.
What is the purpose of the change
Add MatrixVectorMul example. In this example, we implement the matrix-vector multiplication program that shows how to leverage GPU resources in Flink.
Notice that this example could only be executed in a Linux environment with CUDA 10.0.
Brief change log
Add MatrixVectorMul example.
Verifying this change
I manually test it in a Linux environment with NVIDIA GPU and CUDA 10.0 toolkit.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation