You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compare.mlir: Seems to be failing on all scalar compares. Passes on tensor compares.
convert.mlir: No discernible pattern
maximum/minimum.mlir: Fails on <32bit
for sure --- it's nice that you have both cards in the same computer, that's able to really cut down on the "hey can you try this on your computer" latency :)
Yup. I can repro these issues on P1000. Hanhan previously reported them as #1995, #1996, etc. compare.mlir should be working given #1259 is fixed. But yes this is a moving target and things will keep silently going wrong until we've real GPUs hooked up in testing.
Hanhan would you mind to look into these failures too?
102: I ../iree/tools/vm_util.cc:305] Creating driver and device for 'vulkan'...
102: I ../iree/hal/vulkan/vulkan_driver.cc:295] Created Vulkan Device: Quadro P1000
...
102: [----------] Global test environment tear-down
102: [==========] 15 tests from 1 test suite ran. (153 ms total)
102: [ PASSED ] 15 tests.
Ouch. Don't tell me this is loader/driver version issue again. I'm at 1.1.126 for P1000 and 1.2.135 for loader. I see Stella is at 1.1.119 for NVIDIA driver. Could you paste yours @hanhanW so we can compare?
Okay, all the numbers are different. This is gonna be a fun one. Hanhan, please focus on some other important tasks and don't spend too much time on this one now. I'll poke around later.
We are using four buffers here; each iree.unfoldable_constant is initializing one of them. Two of these buffers are 1-byte. But on the CodeGen side, because we don't declare StorageBuffer8BitAccess, we are emulating them as 32-bit buffers. We read the element as 32-bit value and then do a bunch of bit manupilation operations to get the 8-bit value. That's where it becomes problematic. Per the Vulkan spec:
If a SPIR-V OpLoad instruction loads a structure and the tail end of the structure is out of bounds, then all members of the structure are considered out of bounds even if the members at the end are not statically used.
If robustBufferAccess is not enabled, applications must not perform out of bounds accesses.
We just have 1-byte here. So the initial read is out of bounds.
In general such round-tripping such small buffers is not good for GPU. But it might be okay for other accerators like CPU. Putting that aside, if we want to still support this, I think like bool buffers, we need an ABI pre-pass to widen these small buffers. This pass might be specific to GPU.
Problem aside, I think the reason that Hanhan cannot repro these failures on an earlier driver version is that VK_EXT_robustness2 is published earlier this year. That makes the out-of-bounds access more clear.
Activity
stellaraccident commentedon May 27, 2020
compare.mlir: Seems to be failing on all scalar compares. Passes on tensor compares.
convert.mlir: No discernible pattern
maximum/minimum.mlir: Fails on <32bit
stellaraccident commentedon May 27, 2020
Note that these were the only Vulkan specific failures that I saw (most tests pass).
benvanik commentedon May 27, 2020
(as a note, these also fail for me - I think they'll fail on any device besides swiftshader)
stellaraccident commentedon May 27, 2020
I figured - just wanted to document since we basically only have ad-hoc testing for this stuff now.
benvanik commentedon May 27, 2020
for sure --- it's nice that you have both cards in the same computer, that's able to really cut down on the "hey can you try this on your computer" latency :)
antiagainst commentedon May 27, 2020
Yup. I can repro these issues on P1000. Hanhan previously reported them as #1995, #1996, etc.
compare.mlirshould be working given #1259 is fixed. But yes this is a moving target and things will keep silently going wrong until we've real GPUs hooked up in testing.Hanhan would you mind to look into these failures too?
stellaraccident commentedon May 27, 2020
It was nicer when the weather was colder :)
hanhanW commentedon May 27, 2020
Sure, let me take a look on P1000 first. (just saw the bug, my notifier for Github was broken...)
hanhanW commentedon May 27, 2020
Weird...I can't reproduce on my machine.
And I got passed on the test.
antiagainst commentedon May 27, 2020
Ouch. Don't tell me this is loader/driver version issue again. I'm at 1.1.126 for P1000 and 1.2.135 for loader. I see Stella is at 1.1.119 for NVIDIA driver. Could you paste yours @hanhanW so we can compare?
hanhanW commentedon May 28, 2020
$ vulkaninfo
I think I'm at 1.1.99 for driver. Where can I get the version for loader?
antiagainst commentedon May 28, 2020
You can get it at the beginning of
vulkaninfo's dump. There is a "Vulkan Instance Version" line.hanhanW commentedon May 28, 2020
Thanks! It's
Vulkan Instance Version: 1.2.126.antiagainst commentedon May 28, 2020
Okay, all the numbers are different. This is gonna be a fun one. Hanhan, please focus on some other important tasks and don't spend too much time on this one now. I'll poke around later.
antiagainst commentedon Jun 8, 2020
Okay, I think the reason behind these test failures is that we have out-of-bounds buffer access. For example, for
compare_scalar:https://github.com/google/iree/blob/778230076df35c1acbd2745be8366836ac0a69a4/iree/test/e2e/xla_ops/compare.mlir#L12-L21
We are using four buffers here; each
iree.unfoldable_constantis initializing one of them. Two of these buffers are 1-byte. But on the CodeGen side, because we don't declareStorageBuffer8BitAccess, we are emulating them as 32-bit buffers. We read the element as 32-bit value and then do a bunch of bit manupilation operations to get the 8-bit value. That's where it becomes problematic. Per the Vulkan spec:We just have 1-byte here. So the initial read is out of bounds.
In general such round-tripping such small buffers is not good for GPU. But it might be okay for other accerators like CPU. Putting that aside, if we want to still support this, I think like bool buffers, we need an ABI pre-pass to widen these small buffers. This pass might be specific to GPU.
Problem aside, I think the reason that Hanhan cannot repro these failures on an earlier driver version is that VK_EXT_robustness2 is published earlier this year. That makes the out-of-bounds access more clear.
Disabling broken while test on vulkan (#2022).
benvanik commentedon Jun 16, 2020
Had to disable the while op test on vulkan (enabled after d61c548) because it fails on real hardware.