Adds support for
* `cp.async`
* `cp.async.commit_group`
* `cp.async.wait_group`
* `cp.async.wait_all`
Asynchronous copy operations are only supported by AMD Instinct GPUs, so for now we lower them as synchronous copy operations. Because of this, `cp.async.commit_group`, `cp.async.wait_group`, and `cp.async.wait_all` are no-op.
This fixes transcendentals and some other buggy instructions exposed by `ptx_tests` (abs, neg). Add (slow - hardware limitation) tanh.
Only two remaining incorrect instructions are div and sqrt with non-default rounding, but this commit is already bloated enough
Implements bar.red.and.pred and bar.red.or.pred, using the undocument __ockl_wgred functions. Doesn't yet add support for numbered barriers and threadcount, as these are not needed for llm.c.
* LLVM unit tests: add assembly files
* LLVM unit tests: first attempt
* LLVM unit tests: fix - parse bitcode in context
* LLVM unit tests: use pretty_assertions for line-by-line diff
* LLVM unit tests: Write IR to file for failed test
* LLVM unit tests: just use the stack
* LLVM unit tests: use MaybeUninit
* LLVM unit tests: add mul24.ll
* LLVM unit tests: Adjustments after review
* LLVM unit tests: Include emit_llvm::Context in emit_llvm::Module
* LLVM unit tests: Fix typo
* LLVM unit tests: Context need not be pub
The overarching goal is to refactor all passes so they are module-scoped and not function-scoped. Additionally, make improvements to the most egregiously buggy/unfit passes (so the code is ready for the next major features: linking, ftz handling) and continue adding more code to the LLVM backend
Replaces traditional LALRPOP-based parser with winnow-based parser to handle out-of-order instruction modifer. Generate instruction type and instruction visitor from a macro instead of writing by hand. Add separate compilation path using the new parser that only works in tests for now