-
Notifications
You must be signed in to change notification settings - Fork 861
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
Need assistance for Executing my targeted workload on spike RISC-V ISA after adding custom trigonometric Instructions #1747
Comments
As I said here: you can use inline assembly to compile your custom instructions into a RISC-V executable using a RISC-V toolchain that has been extended to support those instructions. You'll probably need to explain in more detail what exactly you mean by this:
What sort of "characterization" do you mean? It's also confusing that you mention Spike and Gem5 when your focus seems to be specifically on Spike (I think)? |
Here are some examples of unit tests that can be run on spike: https://github.com/riscv-software-src/riscv-tests |
I am aiming to characterize some lists of specialized scientific computing workload that comprises a mix of floating-point computations and numerous trigonometric operations. Currently, these trigonometric operations are implemented using a software library. I am interested in determining whether implementing these operations in hardware provides any execution time benefits. Specifically, I want to assess the percentage improvement in performance. This information is crucial for deciding whether to proceed with the hardware implementation of trigonometric operations. Given the substantial size and complexity of these algorithms, modifying the code to use inline assembly would be a significant undertaking. |
In that case then you'll probably have to modify the compiler so that it can generate your custom instructions when it detects appropriate intermediate code patterns. This is not a trivial exercise for someone not familiar with compiler toolchain internals. You'll probably need to ask in an appropriate GCC and/or LLVM/Clang (depending on what toolchain you're going to use) forum. There are mailing lists and other discussion forums for these projects that may be relevant to this topic. |
Hello team,
#ifdef DECLARE_INSN
{"mod", 0, INSN_CLASS_I, "d,s,t", MATCH_MOD, MASK_MOD, match_opcode, 0 }, /* Double-precision floating-point instruction subset. */
//fsin_d.g file with //fcos_s.h file with //fcos_d.h file with //ftan_s.h file with //ftan_d.h file with
riscv_insn_ext_d =
if (isa->extension_enabled('F')) { if (isa->extension_enabled(EXT_ZFINX)) { if (isa->extension_enabled('D')) { if (isa->extension_enabled(EXT_ZDINX)) {
(define_c_enum "unspec" (define_attr "type" (define_insn "sin2" (define_insn "cos2" (define_insn "tan2"
next run the build and installed commandsudo make -j$(nproc) && sudo make build-sim |
Hello team,
I have added the trigonometric instructions on riscv-gnu-toolchain. Now I am specifically looking for the steps required/process to compile my workload in Spike and Gem5 with these newly added instructions and then characterize the workload to evaluate the performance impact of these instructions.
I would greatly appreciate it if someone could provide guidance on how to compile code that utilizes these newly added instructions and execute it on Spike pk to characterize the workload.
Thank you in advance for your assistance.
The text was updated successfully, but these errors were encountered: