You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "echuraev (via GitHub)" <gi...@apache.org> on 2023/09/14 06:52:59 UTC
[GitHub] [tvm] echuraev opened a new pull request, #15745: [OpenCL] Don't initialize OpenCL runtime on host
echuraev opened a new pull request, #15745:
URL: https://github.com/apache/tvm/pull/15745
After adding OpenCL wrapper, it is possible to build TVM with OpenCL support also on the host which doesn't have OpenCL libraries. But if you want to compile OpenCL module for a remote device on such host machine then you will see an error that OpenCL lib cannot be open.
To avoid such problem, `dry_run` argument was added to `OpenCLModuleCreate` function. This argument allows to generate OpenCL module without calling any methods from OpenCL runtime. And now OpenCL methods are called only when they really have to be executed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] echuraev commented on a diff in pull request #15745: [OpenCL] Don't initialize OpenCL runtime on host
Posted by "echuraev (via GitHub)" <gi...@apache.org>.
echuraev commented on code in PR #15745:
URL: https://github.com/apache/tvm/pull/15745#discussion_r1327295692
##########
src/runtime/opencl/opencl_module.cc:
##########
@@ -353,9 +357,10 @@ PackedFunc OpenCLModuleNode::GetFunction(const String& name,
}
Module OpenCLModuleCreate(std::string data, std::string fmt,
- std::unordered_map<std::string, FunctionInfo> fmap, std::string source) {
+ std::unordered_map<std::string, FunctionInfo> fmap, std::string source,
+ bool dry_run) {
auto n = make_object<OpenCLModuleNode>(data, fmt, fmap, source);
- n->Init();
+ n->Init(dry_run);
Review Comment:
Thank you for your comment! Previous implementation was refactored and now we don't need this parameter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi merged pull request #15745: [OpenCL] Don't initialize OpenCL runtime on host
Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi merged PR #15745:
URL: https://github.com/apache/tvm/pull/15745
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] echuraev commented on pull request #15745: [OpenCL] Don't initialize OpenCL runtime on host
Posted by "echuraev (via GitHub)" <gi...@apache.org>.
echuraev commented on PR #15745:
URL: https://github.com/apache/tvm/pull/15745#issuecomment-1718868702
cc: @elvin-n
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] elvin-n commented on a diff in pull request #15745: [OpenCL] Don't initialize OpenCL runtime on host
Posted by "elvin-n (via GitHub)" <gi...@apache.org>.
elvin-n commented on code in PR #15745:
URL: https://github.com/apache/tvm/pull/15745#discussion_r1325589814
##########
src/runtime/opencl/opencl_module.cc:
##########
@@ -353,9 +357,10 @@ PackedFunc OpenCLModuleNode::GetFunction(const String& name,
}
Module OpenCLModuleCreate(std::string data, std::string fmt,
- std::unordered_map<std::string, FunctionInfo> fmap, std::string source) {
+ std::unordered_map<std::string, FunctionInfo> fmap, std::string source,
+ bool dry_run) {
auto n = make_object<OpenCLModuleNode>(data, fmt, fmap, source);
- n->Init();
+ n->Init(dry_run);
Review Comment:
`dry_run` name would assume that we need to have such object and call some API, but results of these calls are not important.
On the other hand, I would assume that no API is called and creation and initialization of OpenCL is just a resuilt of bad design. So, we need either not to create instance of this class or it we have several purposes inside this class and it dedicate for both runtime and some service capabilities, we need to rename this parameter
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] echuraev commented on pull request #15745: [OpenCL] Don't initialize OpenCL runtime on host
Posted by "echuraev (via GitHub)" <gi...@apache.org>.
echuraev commented on PR #15745:
URL: https://github.com/apache/tvm/pull/15745#issuecomment-1731344948
@masahi, @elvin-n Could you please review?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org