diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-05-04 14:44:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-04 14:44:20 -0400 |
| commit | 1c643167a9417e75082b3898425ab9d2d999f583 (patch) | |
| tree | ad7459f186e0cf6b0d938763bae13aa57d23d318 /tests | |
| parent | 7d52d3bd8905dfdf3018c41c9cad4685a98eb009 (diff) | |
More CUDA Half support (#1833)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Split out StringEscapeUtil.
* Added StringEscapeUtil.
* Fix typo in unix quoting type.
* Small comment improvements.
* Try to fix linux linking issue.
* Fix typo.
* Attempt to fix linux link issue.
* Update VS proj even though nothing really changed.
* Fix another typo issue.
* Fix for windows issue.
Fixed bug.
* Make separate Utils for escaping.
* Fix typo.
* Split out into StringEscapeHandler.
* Windows shell does handle removing quotes (so remove code to remove them).
* Handle unescaping if not initiating using the shell.
* Slight improvement around shell like decoding.
* Simplify command extraction.
* Add shared-library category type.
* Fix bug in command extraction.
* Typo in transcendental category.
* Enable unit-test on in smoke test category.
* Make parsing failing output as a failing test.
* Fixes for transcendental tests. Disable tests that do not work.
* Changed category parsing.
* Removed the TestResult parameter from _gatherTestsForFile.
Made testsList only output.
* Remove testing if all tests were disabled.
* Make args of CommandLine always unescaped.
* Add category.
* Don't need escaping on unix/linux.
* Remove some no longer used functions.
* Add requireSMVersion to CUDAExtensionTracker.
* half-calc.slang now works for CUDA.
* bit-cast-16-bit works on CUDA.
* WIP handling of CUDA vector<half> types.
* Half swizzle CUDA.
* Half vector test.
* Fix swizzle half bug.
* Fix compilation issue with narrowing to Index.
* Add unary ops.
* Add some vector scalar maths ops.
* Add half vector conversions for CUDA.
* Fix erroneous comment.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/compute/half-vector-calc.slang | 12 | ||||
| -rw-r--r-- | tests/compute/half-vector-calc.slang.expected.txt | 8 |
2 files changed, 16 insertions, 4 deletions
diff --git a/tests/compute/half-vector-calc.slang b/tests/compute/half-vector-calc.slang index 5594c38fd..3ae204796 100644 --- a/tests/compute/half-vector-calc.slang +++ b/tests/compute/half-vector-calc.slang @@ -23,6 +23,18 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) v1 += v2.wzy; v2 += v0.xyxy; + // Unary + v2 = +v2.yxwz; + v2 = -v2.zwxy; + + // Scalar vector + v1 = v1 + v2.x; + v2 = v2 * half(2.0f); + v0 = half(2.0f) * v0; + v2 = v2 / half(2.0f); + + v0 *= half(2.0f); + v0 = v0 + v0 * v0; v1 = v1 + v1 * v1; v2 = v2 + v2 * v2; diff --git a/tests/compute/half-vector-calc.slang.expected.txt b/tests/compute/half-vector-calc.slang.expected.txt index 64beb1dd1..49c339529 100644 --- a/tests/compute/half-vector-calc.slang.expected.txt +++ b/tests/compute/half-vector-calc.slang.expected.txt @@ -1,5 +1,5 @@ type: float -20.000000 -98.500000 -292.000000 -600.500000 +30.000000 +161.500000 +492.000000 +1021.500000 |
