Skip to content

Enable python GPU tests#7854

Merged
snnn merged 6 commits into
masterfrom
snnn-patch-4
Jun 15, 2021
Merged

Enable python GPU tests#7854
snnn merged 6 commits into
masterfrom
snnn-patch-4

Conversation

@snnn

@snnn snnn commented May 27, 2021

Copy link
Copy Markdown
Contributor

Description:

Enable python GPU tests for CUDA and ROCM EPs.

Motivation and Context

  • Why is this change required? What problem does it solve?

From https://github.com/onnx/onnx/blob/master/onnx/backend/test/runner/__init__.py#L230 you can see it defines two backends: "CPU" and "CUDA". But somehow our python extension names the CUDA backend as "GPU". Because "GPU" is not in ONNX test list, it doesn't get run.

  • If it fixes an open issue, please link to the issue here.

@snnn
snnn requested a review from a team as a code owner May 27, 2021 04:01
@snnn
snnn marked this pull request as draft June 2, 2021 00:35
@snnn

snnn commented Jun 4, 2021

Copy link
Copy Markdown
Contributor Author

By default onnx runtime python binding registers all the available EPs. The list of EPs is gathered from build flags. But, can they all work together peacefully? No. DML and CUDA are not. They can't be both enabled.

So, what should we do?

@snnn
snnn marked this pull request as ready for review June 4, 2021 19:03
Comment thread onnxruntime/python/onnxruntime_pybind_state.cc Outdated
Comment thread onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc Outdated
@snnn
snnn marked this pull request as draft June 5, 2021 01:08
@snnn

snnn commented Jun 9, 2021

Copy link
Copy Markdown
Contributor Author

Waiting #7987

@snnn
snnn marked this pull request as ready for review June 11, 2021 23:00


- task: PythonScript@0
displayName: 'Regenerate cmake config with STATIC_ANALYSIS=ON '

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This part is temporarily removed because there is a bug in the latest VC++ release.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: if we want to eventually add this back (after the bug fix is available) you can turn this step off by using condition False ... this way once the fix is available you can simply enable it again...

//GPU failures
"^test_batchnorm_epsilon_training_mode_cuda",
"^test_batchnorm_example_training_mode_cuda",
"^test_convtranspose_autopad_same_cpu",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: move this above //gpu failures

"^test_batchnorm_epsilon_training_mode_cuda",
"^test_batchnorm_example_training_mode_cuda",
"^test_convtranspose_autopad_same_cpu",
"^test_sub_uint8_cuda",

@askhade askhade Jun 15, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

all the tests starting line 68 to 74 are not supported on both cuda and cpu so changing them to include * should work too like -> "^test_sub_uint8_*"

@askhade

askhade commented Jun 15, 2021

Copy link
Copy Markdown
Contributor

All the comments are nit... no fundamental issues hence approved the PR.

@snnn
snnn merged commit 07788e0 into master Jun 15, 2021
@snnn
snnn deleted the snnn-patch-4 branch June 15, 2021 17:24
@snnn

snnn commented Jun 15, 2021

Copy link
Copy Markdown
Contributor Author

Thank you for the comments. I will address them a bit later.

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.

3 participants