Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jim22k
Copy link

@jim22k jim22k commented Jan 27, 2022

New operation used when sparse_tensor rewrites linalg.generic, allowing for
user-defined behavior within an Intersect or Union operation. The user-defined
logic is embedded in a block within

  • sparse_tensor.linalg_intersect
  • sparse_tensor.linalg_union
  • sparse_tensor.linalg_reduce

Merger has been updated to handle passing an Operation * as part of TensorExp.
Sparsification has been update to handle the concept of a non-zero initial reduction value.

New operation used when sparse_tensor rewrites `linalg.generic`, allowing for
user-defined behavior within an Intersect or Union operation. The user-defined
logic is embedded in a block within `sparse_tensor.linalg`.

Merger has been updated to handle passing an `Operation *` as part of `TensorExp`.
linalg_reduce contains both a reduction formula block as well
as an init block containing the starting reduction value.

Update dynamic output code to accept the starting reduction value;
previously, this was always set to zero.
Previously, CSR @ CSC would often yield a dense matrix.
Now a bool flag is updated as part of the dot product to indicate
at least one overlap. If no overlaps, the lex insert is skipped.
jim22k pushed a commit that referenced this pull request Feb 4, 2022
We experienced some deadlocks when we used multiple threads for logging
using `scan-builds` intercept-build tool when we used multiple threads by
e.g. logging `make -j16`

```
(gdb) bt
#0  0x00007f2bb3aff110 in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f2bb3af70a3 in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007f2bb3d152e4 in ?? ()
llvm#3  0x00007ffcc5f0cc80 in ?? ()
llvm#4  0x00007f2bb3d2bf5b in ?? () from /lib64/ld-linux-x86-64.so.2
llvm#5  0x00007f2bb3b5da27 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
llvm#6  0x00007f2bb3b5dbe0 in exit () from /lib/x86_64-linux-gnu/libc.so.6
llvm#7  0x00007f2bb3d144ee in ?? ()
llvm#8  0x746e692f706d742f in ?? ()
llvm#9  0x692d747065637265 in ?? ()
llvm#10 0x2f653631326b3034 in ?? ()
llvm#11 0x646d632e35353532 in ?? ()
llvm#12 0x0000000000000000 in ?? ()
```

I think the gcc's exit call caused the injected `libear.so` to be unloaded
by the `ld`, which in turn called the `void on_unload() __attribute__((destructor))`.
That tried to acquire an already locked mutex which was left locked in the
`bear_report_call()` call, that probably encountered some error and
returned early when it forgot to unlock the mutex.

All of these are speculation since from the backtrace I could not verify
if frames 2 and 3 are in fact corresponding to the `libear.so` module.
But I think it's a fairly safe bet.

So, hereby I'm releasing the held mutex on *all paths*, even if some failure
happens.

PS: I would use lock_guards, but it's C.

Reviewed-by: NoQ

Differential Revision: https://reviews.llvm.org/D118439
New linalg_mask operation which controls whether a tensor cell is skipped
Put back linalg_yield and make other linalg_* operations terminate with this yield
  -> the rationale for this is that "first" can't work without a proper terminator
linalg_apply now works with index/row/col
masking now works with value
jim22k pushed a commit that referenced this pull request Mar 17, 2022
Add support to inspect the ELF headers for RISCV targets to determine if
RVC or RVE are enabled and the floating point support to enable.  As per
the RISCV specification, d implies f, q implies d implies f, which gives
us the cascading effect that is used to enable the features when setting
up the disassembler.  With this change, it is now possible to attach the
debugger to a remote process and be able to disassemble the instruction
stream.

~~~
$ bin/lldb tmp/reduced
(lldb) target create "reduced"
Current executable set to '/tmp/reduced' (riscv64).
(lldb) gdb-remote localhost:1234
(lldb) Process 5737 stopped
* thread #1, name = 'reduced', stop reason = signal SIGTRAP
    frame #0: 0x0000003ff7fe1b20
->  0x3ff7fe1b20: mv     a0, sp
    0x3ff7fe1b22: jal    1936
    0x3ff7fe1b26: mv     s0, a0
    0x3ff7fe1b28: auipc  a0, 27
~~~
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.

1 participant