-
Notifications
You must be signed in to change notification settings - Fork 82
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
[OpenCL/GPU] Kernel binary caching @open sesame 04/04 09:22 #2503
Conversation
Added utilities for saving kernel as binary files. Added wrapper for clCreateProgramWithBinary. Signed-off-by: Debadri Samaddar <[email protected]>
📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2503. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/. |
cibot: @s-debadri, nntrainer/opencl/opencl_loader.cpp includes bug(s). Please fix incorrect coding constructs in your commit before entering a review process. |
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.
@s-debadri, 💯 All CI checkers are successfully verified. Thanks.
Used better C++ paradigm to enhance readability. Added proper cleanup stub. Signed-off-by: Debadri Samaddar <[email protected]>
cibot: @s-debadri, nntrainer/opencl/opencl_program.cpp includes bug(s). Please fix incorrect coding constructs in your commit before entering a review process. |
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.
@s-debadri, 💯 All CI checkers are successfully verified. Thanks.
nntrainer/opencl/opencl_program.cpp
Outdated
// Write the binary to file | ||
// All kernels in the program will be saved in the binary file | ||
for (unsigned int i = 0; i < num_devices; ++i) { | ||
std::ofstream fs(std::string(kernel_names) + "_kernel.bin", |
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.
It needs to get a parameter save path like kernel_path + ...
which can be defined by option.
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.
Incorporated opencl-kernel-path pre-processor directive in latest commit
@@ -29,8 +31,8 @@ namespace nntrainer::opencl { | |||
* @return true if successful or false otherwise |
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.
It would be better to add a comment for @param binaryCreated
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.
Added in latest commit.
Added opencl-kernel-path preprocessor directive and handled inside opencl_program. Signed-off-by: Debadri Samaddar <[email protected]>
cibot: @s-debadri, nntrainer/opencl/opencl_program.cpp includes bug(s). Please fix incorrect coding constructs in your commit before entering a review process. |
cibot: @s-debadri, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nntrainer/ci/repo-workers/pr-checker/2503-202403152117300.24992704391479-2d0ba968c8c5e44471a42361ff58b6b72a957738/. |
Add DEFAULT_KERNEL_PATH as static member of Program class Modified macros for stringification Signed-off-by: Debadri Samaddar <[email protected]>
cibot: @s-debadri, nntrainer/opencl/opencl_program.cpp includes bug(s). Please fix incorrect coding constructs in your commit before entering a review process. |
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.
@s-debadri, 💯 All CI checkers are successfully verified. Thanks.
@EunjuYang @jihochu PTAL. This is taking too long. |
could you check the CI? |
cibot: @s-debadri, nntrainer/opencl/opencl_program.cpp includes bug(s). Please fix incorrect coding constructs in your commit before entering a review process. |
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.
LGTM!!
i will check CI!!
It means that there are too many conditional compilation directives (#ifdef and others) in the code being analyzed. Cppcheck can handle up to 12 such configurations at a time by default and i give --force option and run in my local environment --> There is no cppcheck error on this PR |
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.
@s-debadri, 💯 All CI checkers are successfully verified. Thanks.
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.
LGTM
Changes for GPU kernel caching:
clGetProgramInfo
.clCreateProgramWithBinary
.Signed-off-by: Debadri Samaddar [email protected]