Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update implementation of built-in functions #96

Merged

Conversation

alexeyvoronov-intel
Copy link
Contributor

Add the host side integer and geometric built-in functions.
Refactoring of the host side built-in functions and built-in functions' tests.
Enable half variants of built-ins.

Added a wrapper of boolean vector.
Used the wrapper in the implementation of relational built-in functions.
Fixed isnormal for scalar double for the host side.
Fixed select for genfloatd and genfloath.

Signed-off-by: Alexey Voronov <[email protected]>
The GPU SPIRV translator cannot handle those function with
the vector first argument type and the scalar type second
/third argument together.

Signed-off-by: Alexey Voronov <[email protected]>
This function has the accuracy that implementation-defined and
cannot checked independed. Simply calling of this function is
checked by CTS.

Signed-off-by: Alexey Voronov <[email protected]>
Signed-off-by: Alexey Voronov <[email protected]>
Fix macro __HAFL_ENABLED.

Signed-off-by: Alexey Voronov <[email protected]>
Removed I/O.
Replace namespace cl::sycl to s for the tests.

Signed-off-by: Alexey Voronov <[email protected]>
Removed a code duplication.
Moved the common implementation functions to anonymous namespace.

Signed-off-by: Alexey Voronov <[email protected]>
@romanovvlad romanovvlad merged commit 066adc4 into intel:sycl Apr 21, 2019
@alexeyvoronov-intel alexeyvoronov-intel deleted the private/avoronov/update_builtins branch May 14, 2019 15:02
bb-sycl pushed a commit that referenced this pull request Feb 11, 2021
This patch implemented TTI.IntImmCost() properly.
Each BPF insn has 32bit immediate space, so for any immediate
which can be represented as 32bit signed int, the cost
is technically free. If an int cannot be presented as
a 32bit signed int, a ld_imm64 instruction is needed
and a TCC_Basic is returned.

This change is motivated when we observed that
several bpf selftests failed with latest llvm trunk, e.g.,
  #10/16 strobemeta.o:FAIL
  #10/17 strobemeta_nounroll1.o:FAIL
  #10/18 strobemeta_nounroll2.o:FAIL
  #10/19 strobemeta_subprogs.o:FAIL
  #96 snprintf_btf:FAIL

The reason of the failure is due to that
SpeculateAroundPHIsPass did aggressive transformation
which alters control flow for which currently verifer
cannot handle well. In llvm12, SpeculateAroundPHIsPass
is not called.

SpeculateAroundPHIsPass relied on TTI.getIntImmCost()
and TTI.getIntImmCostInst() for profitability
analysis. This patch implemented TTI.getIntImmCost()
properly for BPF backend which also prevented
transformation which caused the above test failures.

Differential Revision: https://reviews.llvm.org/D96448
iclsrc pushed a commit that referenced this pull request Dec 21, 2023
This PR adds support for thread names in lldb on Windows.

```
(lldb) thr list
Process 2960 stopped
  thread #53: tid = 0x03a0, 0x00007ff84582db34 ntdll.dll`NtWaitForMultipleObjects + 20
  thread #29: tid = 0x04ec, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPUW.6'
  thread #89: tid = 0x057c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000019] physics[main]'
  thread #3: tid = 0x0648, 0x00007ff843c2cafe combase.dll`InternalDoATClassCreate + 39518
  thread #93: tid = 0x0688, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100501d] uMovie::StreamingThread'
  thread #1: tid = 0x087c, 0x00007ff842e7a104 win32u.dll`NtUserMsgWaitForMultipleObjectsEx + 20
  thread #96: tid = 0x0890, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1002020] HLE Video Decoder'
<...>
```
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