forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
sparse_tensor.linalg operation #1
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
Open
jim22k
wants to merge
10
commits into
main
Choose a base branch
from
sparse_linalg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New operation used when sparse_tensor rewrites
linalg.generic
, allowing foruser-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 ofTensorExp
.Sparsification has been update to handle the concept of a non-zero initial reduction value.