You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/08/18 13:03:55 UTC
[GitHub] [tvm] valmat07 opened a new pull request, #12490: [OpenCL] Enable OpenCL for GPU tasks
valmat07 opened a new pull request, #12490:
URL: https://github.com/apache/tvm/pull/12490
Enable OpenCL support for GPU tests.
--
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] valmat07 commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
valmat07 commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r962760327
##########
tests/python/contrib/test_opencl/test_run_gtests.py:
##########
@@ -28,6 +29,7 @@
# for example to run all "foo" tests twice and observe gtest output run
# pytest -sv <this file> --gtests_args="--gtest_filter=*foo* --gtest_repeat=2"
@tvm.testing.requires_opencl
+@pytest.mark.xfail(raises=AttributeError)
Review Comment:
I couldn't enable opencl cpp tests due to problems with CI environment. For enabling openCL Gtests we need to get source of googletests but there are no sources in the docker image. I also tried to get source from git (you can check my some commits for this) but when we reinstall gtest lib, other CPP tests become broken. So I decided to mark this test as xfail.
--
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] valmat07 commented on pull request #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
valmat07 commented on PR #12490:
URL: https://github.com/apache/tvm/pull/12490#issuecomment-1238287429
@tvm-bot rerun
--
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] valmat07 commented on pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
valmat07 commented on PR #12490:
URL: https://github.com/apache/tvm/pull/12490#issuecomment-1240461906
@tvm-bot rerun
--
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] valmat07 commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
valmat07 commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r964724991
##########
tests/scripts/task_python_integration.sh:
##########
@@ -61,12 +61,16 @@ run_pytest cython ${TVM_INTEGRATION_TESTSUITE_NAME}-dso_plugin_module-1 apps/dso
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-integration tests/python/integration
# Ignoring Arm(R) Ethos(TM)-U NPU tests in the collective to run to run them in parallel in the next step.
-run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
+run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn --ignore=tests/python/contrib/test_opencl
# forked is needed because the global registry gets contaminated
TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm;cuda}" \
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-relay tests/python/relay
+# OpenCL texture test. Deselected specific tests that fails in CI
+TVM_TEST_TARGETS="${TVM_RELAY_OPENCL_TEXTURE_TARGETS:-opencl}" \
+ run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-opencl-texture tests/python/relay/opencl_texture --deselect=tests/python/relay/opencl_texture/test_conv2d_nchw_texture.py::test_residual_block
Review Comment:
Generally we want to exclude some tests only for nvidia devices, but I couldn't find the proper way to exclude tests for nvidia. So maybe there is some way to exclude tests by making sure it doesn't run on nvidia?
--
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 #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
echuraev commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r963262834
##########
CMakeLists.txt:
##########
@@ -798,4 +798,4 @@ if(${SUMMARIZE})
print_summary()
endif()
-dump_options_to_file("${TVM_ALL_OPTIONS}")
+dump_options_to_file("${TVM_ALL_OPTIONS}")
Review Comment:
Revert this change.
##########
tests/python/relay/opencl_texture/utils/adreno_utils.py:
##########
@@ -71,7 +71,7 @@ def build_run_compare(
tvm_mod_nchwc = gpu_preprocess(tvm_mod)
else:
tvm_mod_nchwc = tvm_mod
-
+
Review Comment:
Remove the spaces
##########
tests/python/relay/opencl_texture/test_conv2d_nhwc_texture.py:
##########
@@ -398,11 +384,9 @@ def test_conv2d_inceptionv3_nhwc_3c():
@tvm.testing.requires_opencl
-def test_conv2d_1x1_16c16spatial():
- target = "opencl --device=adreno"
- dtype = "float16"
-
- input_shape = (1, 256, 256, 16)
+@tvm.testing.parametrize_targets("opencl -device=adreno")
+def test_conv2d_1x1_16c16spatial(target, dtype):
+ input_shape = (1, 128, 128, 16)
Review Comment:
Why did you change input shape?
--
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 #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
echuraev commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r962521169
##########
tests/python/relay/opencl_texture/test_conv2d_nchw_texture.py:
##########
@@ -437,7 +422,7 @@ def test_conv2d_vgg16_winograd_4d():
stat_file = temp.relpath("stat.log")
with open(stat_file, "w") as f:
f.write(
- '{"input": ["opencl -keys=adreno,opencl,gpu -device=adreno -max_num_threads=256", "conv2d_nchw_winograd_acc32.image2d", [["TENSOR", [1, 512, 28, 28], "float16"], ["TENSOR", [512, 512, 3, 3], "float16"], [1, 1], [1, 1, 1, 1], [1, 1], "float16"], {}], "config": {"index": 1591, "code_hash": null, "entity": [["auto_unroll_max_step", "ot", 4], ["tile_y", "sp", [-1, 1, 32]], ["tile_x", "sp", [-1, 4, 2]], ["tile_rc", "sp", [-1, 8]]]}, "result": [[0.0037244], 0, 7.06374192237854, 1653898629.7427933], "version": 0.2, "tvm_version": "0.8.dev0"}\n'
+ '{"input": ["opencl -keys=adreno,opencl,gpu -device=adreno -max_num_threads=256", "conv2d_nchw_winograd_acc32.image2d", [["TENSOR", [1, 512, 28, 28], "float32"], ["TENSOR", [512, 512, 3, 3], "float32"], [1, 1], [1, 1, 1, 1], [1, 1], "float32"], {}], "config": {"index": 1591, "code_hash": null, "entity": [["auto_unroll_max_step", "ot", 4], ["tile_y", "sp", [-1, 1, 32]], ["tile_x", "sp", [-1, 4, 2]], ["tile_rc", "sp", [-1, 8]]]}, "result": [[0.0037244], 0, 7.06374192237854, 1653898629.7427933], "version": 0.2, "tvm_version": "0.8.dev0"}\n'
Review Comment:
You can use here value of variable `dtype` and the same below.
##########
tests/cpp-runtime/opencl/run_gtests.cc:
##########
@@ -40,7 +40,7 @@ TVM_REGISTER_GLOBAL("opencl.run_gtests").set_body([](TVMArgs args, TVMRetValue*
argv.push_back(const_cast<char*>("opencl_run_gtests"));
// add parsed arguments
- for (int i = 0; i < parsed_args.size(); ++i) {
+ for (uint i = 0; i < parsed_args.size(); ++i) {
Review Comment:
`size_t` should be better than `uint`.
##########
tests/python/relay/opencl_texture/test_conv2d_nhwc_texture.py:
##########
@@ -313,10 +303,9 @@ def test_conv2d_inceptionv3_35_35_strides():
@tvm.testing.requires_opencl
-def test_conv2d_resnet50_v2_nhwc_3c():
- target = "opencl --device=adreno"
- dtype = "float16"
-
+@tvm.testing.parametrize_targets("opencl -device=adreno")
+@pytest.mark.xfail(raises=tvm._ffi.base.TVMError)
Review Comment:
Why some of the tests are marked as xfail? I thought that all of them should be passed.
##########
tests/python/contrib/test_opencl/test_run_gtests.py:
##########
@@ -28,6 +29,7 @@
# for example to run all "foo" tests twice and observe gtest output run
# pytest -sv <this file> --gtests_args="--gtest_filter=*foo* --gtest_repeat=2"
@tvm.testing.requires_opencl
+@pytest.mark.xfail(raises=AttributeError)
Review Comment:
Why do we need to mark this test as xfail?
##########
CMakeLists.txt:
##########
@@ -798,4 +798,4 @@ if(${SUMMARIZE})
print_summary()
endif()
-dump_options_to_file("${TVM_ALL_OPTIONS}")
+dump_options_to_file("${TVM_ALL_OPTIONS}")
Review Comment:
No meaningful changes. Please revert it.
##########
tests/python/relay/opencl_texture/test_conv2d_nhwc_texture.py:
##########
@@ -598,7 +576,7 @@ def test_conv2d_vgg16_winograd_4d():
stat_file = temp.relpath("stat.log")
with open(stat_file, "w") as f:
f.write(
- '{"input": ["opencl -keys=adreno,opencl,gpu -device=adreno -max_num_threads=256", "conv2d_nhwc_winograd_acc32.image2d", [["TENSOR", [1, 28, 28, 512], "float16"], ["TENSOR", [3, 3, 512, 512], "float16"], [1, 1], [1, 1, 1, 1], [1, 1], "float16"], {}], "config": {"index": 1591, "code_hash": null, "entity": [["auto_unroll_max_step", "ot", 4], ["tile_y", "sp", [-1, 1, 32]], ["tile_x", "sp", [-1, 4, 2]], ["tile_rc", "sp", [-1, 8]]]}, "result": [[0.0037244], 0, 7.06374192237854, 1653898629.7427933], "version": 0.2, "tvm_version": "0.8.dev0"}\n'
+ '{"input": ["opencl -keys=adreno,opencl,gpu -device=adreno -max_num_threads=256", "conv2d_nhwc_winograd_acc32.image2d", [["TENSOR", [1, 28, 28, 512], "float32"], ["TENSOR", [3, 3, 512, 512], "float32"], [1, 1], [1, 1, 1, 1], [1, 1], "float32"], {}], "config": {"index": 1591, "code_hash": null, "entity": [["auto_unroll_max_step", "ot", 4], ["tile_y", "sp", [-1, 1, 32]], ["tile_x", "sp", [-1, 4, 2]], ["tile_rc", "sp", [-1, 8]]]}, "result": [[0.0037244], 0, 7.06374192237854, 1653898629.7427933], "version": 0.2, "tvm_version": "0.8.dev0"}\n'
Review Comment:
Use `dtype`
##########
tests/python/relay/opencl_texture/utils/adreno_utils.py:
##########
@@ -71,7 +71,6 @@ def build_run_compare(
tvm_mod_nchwc = gpu_preprocess(tvm_mod)
else:
tvm_mod_nchwc = tvm_mod
Review Comment:
Please, revert this change
##########
tests/python/relay/opencl_texture/test_conv2d_nchw_texture.py:
##########
@@ -496,7 +479,9 @@ def test_conv2d_winograd_conv():
@tvm.testing.requires_opencl
-def test_residual_block():
+@tvm.testing.parametrize_targets("opencl -device=adreno")
+@pytest.mark.xfail
Review Comment:
Why this test marked as `xfail`?
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] driazati commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r966214352
##########
tests/python/contrib/test_opencl/test_run_gtests.py:
##########
@@ -28,6 +28,7 @@
# for example to run all "foo" tests twice and observe gtest output run
# pytest -sv <this file> --gtests_args="--gtest_filter=*foo* --gtest_repeat=2"
@tvm.testing.requires_opencl
+@pytest.mark.skipif(True, reason="failed due to nvidia libOpencl in the CI")
Review Comment:
did you want to condition this? with `True` it will always be skipped, even locally
--
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] driazati commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r966213489
##########
tests/scripts/task_python_integration.sh:
##########
@@ -61,12 +61,14 @@ run_pytest cython ${TVM_INTEGRATION_TESTSUITE_NAME}-dso_plugin_module-1 apps/dso
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-integration tests/python/integration
# Ignoring Arm(R) Ethos(TM)-U NPU tests in the collective to run to run them in parallel in the next step.
-run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
-
+run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
# forked is needed because the global registry gets contaminated
TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm;cuda}" \
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-relay tests/python/relay
+# OpenCL texture test. Deselected specific tests that fails in CI
+TVM_TEST_TARGETS="${TVM_RELAY_OPENCL_TEXTURE_TARGETS:-opencl}" \
+ run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-opencl-texture tests/python/relay/opencl_texture
Review Comment:
one more thing, won't this get run as part of `test/python/relay` in the `run_pytest` above this one?
--
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] valmat07 commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
valmat07 commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r964669505
##########
tests/scripts/task_python_integration.sh:
##########
@@ -61,12 +61,16 @@ run_pytest cython ${TVM_INTEGRATION_TESTSUITE_NAME}-dso_plugin_module-1 apps/dso
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-integration tests/python/integration
# Ignoring Arm(R) Ethos(TM)-U NPU tests in the collective to run to run them in parallel in the next step.
-run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
+run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn --ignore=tests/python/contrib/test_opencl
# forked is needed because the global registry gets contaminated
TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm;cuda}" \
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-relay tests/python/relay
+# OpenCL texture test. Deselected specific tests that fails in CI
+TVM_TEST_TARGETS="${TVM_RELAY_OPENCL_TEXTURE_TARGETS:-opencl}" \
+ run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-opencl-texture tests/python/relay/opencl_texture --deselect=tests/python/relay/opencl_texture/test_conv2d_nchw_texture.py::test_residual_block
Review Comment:
But the main thing here is that this test works well locally on adreno devices, so you don’t want to skip it. But in CI environment due to we have nvidia device so different libOpenCL, this test doesn't work properly.
--
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] driazati commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r965102076
##########
tests/scripts/task_python_integration.sh:
##########
@@ -61,12 +61,16 @@ run_pytest cython ${TVM_INTEGRATION_TESTSUITE_NAME}-dso_plugin_module-1 apps/dso
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-integration tests/python/integration
# Ignoring Arm(R) Ethos(TM)-U NPU tests in the collective to run to run them in parallel in the next step.
-run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
+run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn --ignore=tests/python/contrib/test_opencl
# forked is needed because the global registry gets contaminated
TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm;cuda}" \
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-relay tests/python/relay
+# OpenCL texture test. Deselected specific tests that fails in CI
+TVM_TEST_TARGETS="${TVM_RELAY_OPENCL_TEXTURE_TARGETS:-opencl}" \
+ run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-opencl-texture tests/python/relay/opencl_texture --deselect=tests/python/relay/opencl_texture/test_conv2d_nchw_texture.py::test_residual_block
Review Comment:
You can do whatever logic is necessary in the condition for the `skipIf` so that it's only skipped in the specific cases you want (e.g. here maybe just `skipIf(tvm.testing.utils.IS_IN_CI, reason="...")`). Also in `tvm/testing/utils.py` take a look at `requires_cuda` or `uses_gpu` as they may already do what you need
--
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] valmat07 commented on pull request #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
valmat07 commented on PR #12490:
URL: https://github.com/apache/tvm/pull/12490#issuecomment-1238285258
@tvm-bot rerun
--
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] valmat07 commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
valmat07 commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r965919608
##########
tests/scripts/task_python_integration.sh:
##########
@@ -61,12 +61,16 @@ run_pytest cython ${TVM_INTEGRATION_TESTSUITE_NAME}-dso_plugin_module-1 apps/dso
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-integration tests/python/integration
# Ignoring Arm(R) Ethos(TM)-U NPU tests in the collective to run to run them in parallel in the next step.
-run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
+run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn --ignore=tests/python/contrib/test_opencl
# forked is needed because the global registry gets contaminated
TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm;cuda}" \
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-relay tests/python/relay
+# OpenCL texture test. Deselected specific tests that fails in CI
+TVM_TEST_TARGETS="${TVM_RELAY_OPENCL_TEXTURE_TARGETS:-opencl}" \
+ run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-opencl-texture tests/python/relay/opencl_texture --deselect=tests/python/relay/opencl_texture/test_conv2d_nchw_texture.py::test_residual_block
Review Comment:
Added skipif instead of deselect. Thanks for the suggestion!
--
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] valmat07 commented on pull request #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
valmat07 commented on PR #12490:
URL: https://github.com/apache/tvm/pull/12490#issuecomment-1237385541
@echuraev I found better solutions to exclude tests, now they are excluded in CI scripts. Please check
--
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] valmat07 commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
valmat07 commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r962760327
##########
tests/python/contrib/test_opencl/test_run_gtests.py:
##########
@@ -28,6 +29,7 @@
# for example to run all "foo" tests twice and observe gtest output run
# pytest -sv <this file> --gtests_args="--gtest_filter=*foo* --gtest_repeat=2"
@tvm.testing.requires_opencl
+@pytest.mark.xfail(raises=AttributeError)
Review Comment:
I couldn't enable opencl cpp tests due to problems with CI environment. For enabling openCL Gtests we need to get source of googletests but there are no sources in the docker image. I also tried to get source from git (you can check my some commits for this) but when we reinstall gtest lib, other CPP tests become broken. So I decided to mark this test as xfail and dont enable opencl tests in the CI.
--
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 #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
echuraev commented on PR #12490:
URL: https://github.com/apache/tvm/pull/12490#issuecomment-1238927194
cc: @masahi, @csullivan, @TejashShah, @driazati
--
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] TejashShah commented on pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
TejashShah commented on PR #12490:
URL: https://github.com/apache/tvm/pull/12490#issuecomment-1242228114
cc @masahi @junrushao, it needs a merge trigger!
--
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] valmat07 commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
valmat07 commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r963511628
##########
tests/python/relay/opencl_texture/test_conv2d_nhwc_texture.py:
##########
@@ -398,11 +384,9 @@ def test_conv2d_inceptionv3_nhwc_3c():
@tvm.testing.requires_opencl
-def test_conv2d_1x1_16c16spatial():
- target = "opencl --device=adreno"
- dtype = "float16"
-
- input_shape = (1, 256, 256, 16)
+@tvm.testing.parametrize_targets("opencl -device=adreno")
+def test_conv2d_1x1_16c16spatial(target, dtype):
+ input_shape = (1, 128, 128, 16)
Review Comment:
Because there was an error that there is not enough memory for opencl
--
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] valmat07 commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
valmat07 commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r966238113
##########
tests/scripts/task_python_integration.sh:
##########
@@ -61,12 +61,14 @@ run_pytest cython ${TVM_INTEGRATION_TESTSUITE_NAME}-dso_plugin_module-1 apps/dso
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-integration tests/python/integration
# Ignoring Arm(R) Ethos(TM)-U NPU tests in the collective to run to run them in parallel in the next step.
-run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
-
+run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
# forked is needed because the global registry gets contaminated
TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm;cuda}" \
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-relay tests/python/relay
+# OpenCL texture test. Deselected specific tests that fails in CI
+TVM_TEST_TARGETS="${TVM_RELAY_OPENCL_TEXTURE_TARGETS:-opencl}" \
+ run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-opencl-texture tests/python/relay/opencl_texture
Review Comment:
a large number of tests in `tests/python/realy/` for OpenCL do not run, for various reasons, so I took out the texture tests separately so as not to mark relay tests for some special occasions.
--
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 #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
masahi merged PR #12490:
URL: https://github.com/apache/tvm/pull/12490
--
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] driazati commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tests
Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r964409619
##########
tests/scripts/task_python_integration.sh:
##########
@@ -61,12 +61,16 @@ run_pytest cython ${TVM_INTEGRATION_TESTSUITE_NAME}-dso_plugin_module-1 apps/dso
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-integration tests/python/integration
# Ignoring Arm(R) Ethos(TM)-U NPU tests in the collective to run to run them in parallel in the next step.
-run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn
+run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-contrib tests/python/contrib --ignore=tests/python/contrib/test_ethosu --ignore=tests/python/contrib/test_cmsisnn --ignore=tests/python/contrib/test_opencl
# forked is needed because the global registry gets contaminated
TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm;cuda}" \
run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-relay tests/python/relay
+# OpenCL texture test. Deselected specific tests that fails in CI
+TVM_TEST_TARGETS="${TVM_RELAY_OPENCL_TEXTURE_TARGETS:-opencl}" \
+ run_pytest ctypes ${TVM_INTEGRATION_TESTSUITE_NAME}-opencl-texture tests/python/relay/opencl_texture --deselect=tests/python/relay/opencl_texture/test_conv2d_nchw_texture.py::test_residual_block
Review Comment:
Instead of deselecting here can you:
1. File a GitHub issue with the test name and some context on why it fails with OpenCL
2. Move the skipping to the test itself via [`pytest.mark.skipIf`](https://docs.pytest.org/en/7.1.x/how-to/skipping.html) and be sure to add a `reason="See <link to apache/tvm GitHub issue>"`?
That might make it so you don't need to change this script at all
--
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] valmat07 commented on a diff in pull request #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
valmat07 commented on code in PR #12490:
URL: https://github.com/apache/tvm/pull/12490#discussion_r962766542
##########
tests/python/relay/opencl_texture/test_conv2d_nhwc_texture.py:
##########
@@ -313,10 +303,9 @@ def test_conv2d_inceptionv3_35_35_strides():
@tvm.testing.requires_opencl
-def test_conv2d_resnet50_v2_nhwc_3c():
- target = "opencl --device=adreno"
- dtype = "float16"
-
+@tvm.testing.parametrize_targets("opencl -device=adreno")
+@pytest.mark.xfail(raises=tvm._ffi.base.TVMError)
Review Comment:
Some test in `test_conv2d_nhwc_texture.py` marked as xfail because in CI we have nvidia opencl lib, and this tests fails in the CI. Locally, on my nvidia device, i also have this problem, but when I tried to run tests on my adreno device, everything works fine.
--
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] valmat07 commented on pull request #12490: [OpenCL] Enable OpenCL for GPU tasks
Posted by GitBox <gi...@apache.org>.
valmat07 commented on PR #12490:
URL: https://github.com/apache/tvm/pull/12490#issuecomment-1231475421
This PR enables OpenCL test in CI. For that:
- Added USE_OPENCL flag in the build gpu script
- Added adreno target in the CI target
- Moved relay opencl texture tests in different location to support run them independently. This is necessary due to not all relay tests supports OpenCL CI configuration
- Now opencl texture tests working in fp32.
--
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