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

[CLML] Version compatibility and various test cases #13670

Merged
merged 5 commits into from
Jan 3, 2023

Conversation

srkreddy1238
Copy link
Contributor

@srkreddy1238 srkreddy1238 commented Dec 28, 2022

CLML version compatibility changes to support future versions.

Codegen verification test cases for all the ops (convolution, concat, pad, pool ..etc.) that are supported by clml BYOC path.

Fix depthwise conv2d issue with layout

Adreno container is now free from CLML SDK dependency. We can use it for texture only builds now.

Codegen verification test cases for all the ops (convolution, concat, pad, pool ..etc.)
that are supported by clml BYOC path.

Fix depthwise conv2d issue with layout
@tvm-bot
Copy link
Collaborator

tvm-bot commented Dec 28, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: clml See #10317 for details

Generated by tvm-bot

@srkreddy1238 srkreddy1238 changed the title [CLML][TEST] Codegen test cases for ops [CLML] Version compatibility and various test cases Dec 29, 2022
@srkreddy1238 srkreddy1238 force-pushed the clml-base branch 2 times, most recently from e84da6b to c82af19 Compare December 29, 2022 13:20
Copy link
Contributor

@echuraev echuraev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Several comments

if(EXISTS ${CLML_VERSION_HEADER})
file(READ ${CLML_VERSION_HEADER} ver)
string(REGEX MATCH "CL_QCOM_ML_OPS_H_MAJOR_VERSION ([0-9]*)" _ ${ver})
set(CLML_VERSION_MAJOR ${CMAKE_MATCH_1})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible situation that we build TVM with a new version of CLML but our target device doesn't support it? Maybe it is better to restrict version of CLML as it was done for OpenCL (we use OpenCL 1.2)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For codegen, OpenCL1.2 restriction is good as we don't have any requirement of using features from higher versions.

CLML has newer versions with new operators support and is essential to support to get perf improvements on new gerations.

src/relay/backend/contrib/clml/codegen.cc Outdated Show resolved Hide resolved
}
ICHECK(h_ClmlIntf != NULL)
<< "clGetMLInterfaceVxQCOM:" << result
<< " Perhaps there is mispatch between CLML SDK version to target supported version";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's print target supported version

Comment on lines +176 to +178
# time_f = gen_module.module.time_evaluator("run", device.device.cl(0), number=1)
# cost = time_f().mean
# print("%g secs/iteration\n" % cost)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This affects CI time and also to get ideal numbers we need to set number to a higher value too.
For now, I am leaving it for developers to uncomment and use.

tests/scripts/task_build_adreno_bins.sh Show resolved Hide resolved
tests/python/contrib/test_clml/test_ops.py Show resolved Hide resolved
tests/python/contrib/test_clml/test_ops.py Outdated Show resolved Hide resolved
@srkreddy1238 srkreddy1238 force-pushed the clml-base branch 2 times, most recently from bd58646 to a85e777 Compare January 2, 2023 04:15
@masahi masahi merged commit b6851f3 into apache:main Jan 3, 2023
fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this pull request Mar 27, 2023
* [CLML][TEST] Codegen test cases for ops

Codegen verification test cases for all the ops (convolution, concat, pad, pool ..etc.)
that are supported by clml BYOC path.

Fix depthwise conv2d issue with layout

* * lint errors

* * version compatilibility changes.

* * review comments

* * Make the adreno container compatible w/ and w/o CLML SDK availability

Co-authored-by: Siva Rama Krishna Reddy B <sivb@qti.qualcomm.com>
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