Skip to content

Add WebGPU compilation tests for xla_ops/ and tosa_ops/. - #10909

Merged
ScottTodd merged 1 commit into
iree-org:mainfrom
ScottTodd:webgpu-compiler-tests-e2e
Oct 26, 2022
Merged

ScottTodd merged 1 commit into
iree-org:mainfrom
ScottTodd:webgpu-compiler-tests-e2e

Conversation

@ScottTodd

Copy link
Copy Markdown
Member

Copied over manually for now, but if the WebGPU target was supported in the Bazel build we could use enforce_glob with exclude.

Just compilation tests for now (like with llvm-cpu / wasm), but I'm hoping to also test execution once the WebGPU HAL is working and I have it running on CI in some form.

@ScottTodd ScottTodd added infrastructure Relating to build systems, CI, or testing platform/web 🌐 Web-specific build, execution, benchmarking, and deployment labels Oct 25, 2022
@ScottTodd
ScottTodd marked this pull request as ready for review October 26, 2022 17:32
@ScottTodd
ScottTodd merged commit ec46337 into iree-org:main Oct 26, 2022
@ScottTodd
ScottTodd deleted the webgpu-compiler-tests-e2e branch October 26, 2022 17:32
ScottTodd added a commit that referenced this pull request Oct 26, 2022
ScottTodd added a commit that referenced this pull request Oct 26, 2022
…0918)

Reverts #10909

That change broke the `iree-test-android` CI pipeline:
https://buildkite.com/iree/iree-test-android/builds/7461#0184155a-9dca-4f64-8010-660f07d0b12a

```
[2022-10-26T17:52:28Z] cd /usr/src/github/iree/build-android/tests/e2e/tosa_ops && /usr/src/github/iree/build-android/../build-host/install/bin/iree-compile --output-format=vm-bytecode --mlir-print-op-on-diagnostic=false --iree-hal-target-backends=webgpu --iree-input-type=tosa /usr/src/github/iree/tests/e2e/tosa_ops/bitwise_or.mlir -o check_webgpu_bitwise_or.mlir_module.vmfb
--
  | [2022-10-26T17:52:28Z] /usr/src/github/iree/tests/e2e/tosa_ops/bitwise_or.mlir:0:0: error: target backend 'webgpu' not registered; registered backends: llvm-cpu, metal, metal, vmvx, vmvx-inline, vulkan, vulkan
  | [2022-10-26T17:52:28Z] compilation failed
```
PhaneeshB pushed a commit to PhaneeshB/iree that referenced this pull request Oct 31, 2022
)

Copied over manually for now, but if the WebGPU target was supported in
the Bazel build we could use `enforce_glob` with `exclude`.

Just compilation tests for now (like with llvm-cpu / wasm), but I'm
hoping to also test execution once the WebGPU HAL is working and I have
it running on CI in some form.
PhaneeshB pushed a commit to PhaneeshB/iree that referenced this pull request Oct 31, 2022
…ee-org#10918)

Reverts iree-org#10909

That change broke the `iree-test-android` CI pipeline:
https://buildkite.com/iree/iree-test-android/builds/7461#0184155a-9dca-4f64-8010-660f07d0b12a

```
[2022-10-26T17:52:28Z] cd /usr/src/github/iree/build-android/tests/e2e/tosa_ops && /usr/src/github/iree/build-android/../build-host/install/bin/iree-compile --output-format=vm-bytecode --mlir-print-op-on-diagnostic=false --iree-hal-target-backends=webgpu --iree-input-type=tosa /usr/src/github/iree/tests/e2e/tosa_ops/bitwise_or.mlir -o check_webgpu_bitwise_or.mlir_module.vmfb
--
  | [2022-10-26T17:52:28Z] /usr/src/github/iree/tests/e2e/tosa_ops/bitwise_or.mlir:0:0: error: target backend 'webgpu' not registered; registered backends: llvm-cpu, metal, metal, vmvx, vmvx-inline, vulkan, vulkan
  | [2022-10-26T17:52:28Z] compilation failed
```
hanhanW pushed a commit to hanhanW/iree that referenced this pull request Nov 1, 2022
…ee-org#10918)

Reverts iree-org#10909

That change broke the `iree-test-android` CI pipeline:
https://buildkite.com/iree/iree-test-android/builds/7461#0184155a-9dca-4f64-8010-660f07d0b12a

```
[2022-10-26T17:52:28Z] cd /usr/src/github/iree/build-android/tests/e2e/tosa_ops && /usr/src/github/iree/build-android/../build-host/install/bin/iree-compile --output-format=vm-bytecode --mlir-print-op-on-diagnostic=false --iree-hal-target-backends=webgpu --iree-input-type=tosa /usr/src/github/iree/tests/e2e/tosa_ops/bitwise_or.mlir -o check_webgpu_bitwise_or.mlir_module.vmfb
--
  | [2022-10-26T17:52:28Z] /usr/src/github/iree/tests/e2e/tosa_ops/bitwise_or.mlir:0:0: error: target backend 'webgpu' not registered; registered backends: llvm-cpu, metal, metal, vmvx, vmvx-inline, vulkan, vulkan
  | [2022-10-26T17:52:28Z] compilation failed
```
ScottTodd added a commit that referenced this pull request Nov 28, 2022
* Fixes #10908
* I still see this error: #10906
* There are new errors with `exp`, `log`, `sigmoid`: `error: value
cannot be represented as 'f32': -inf` (not totally unexpected given the
current policy on NaN/Inf, but good to keep tracking:
#10142)

I did add some relevant tests before
(#10909), but we had to revert that
change because of an incomplete CMake cross compilation configuration:
#10918. It's worth trying that
again.
ScottTodd added a commit that referenced this pull request Nov 29, 2022
…11327)

This reverts #10918 to roll forward
#10909, adding a hack to skip
WebGPU testdata compilation when cross compiling. The right way to add
this test coverage is likely either
* Adding a new test macro that just tests compilation without even
considering runtime/execution
* Adding the `IREE_HAL_DRIVER_WEBGPU` option and running tests with it
(this won't really work until I have more tests working, and the tools
are updated to somehow handle async readback... so I'm not hopeful about
this approach for at least several months)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Relating to build systems, CI, or testing platform/web 🌐 Web-specific build, execution, benchmarking, and deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants