herbie-fp / odyssey

A platform for exploring floating-point expressions :boat:
https://herbie-fp.github.io/odyssey/
MIT License
18 stars 0 forks source link

GPU-FPX support issue #150

Open elmisback opened 1 month ago

elmisback commented 1 month ago

I'll add Nick to this issue once I have a github username

reporterfredbriggs commented 1 month ago

Here I am!

elmisback commented 1 month ago

You can track your progress here! Feel free to add more issues as appropriate to break things into parts.

reporterfredbriggs commented 1 month ago

@NoxNovus When I start working on the new component, how should I structure the project, should I make a branch? Clone the repo then submit a pr? Let me know!

reporterfredbriggs commented 3 weeks ago
elmisback commented 3 weeks ago

Next steps:

reporterfredbriggs commented 2 weeks ago

@elmisback I know we talked about having GPU-FPX run on all the expressions by default and add other features to the integration later but because there are two parts to GPU-FPX:

I think it would make sense to only run the detector on expressions as a default, and give users an option to run the analyzer if desired. I feel like users probably will want to explore the expression options they are given with the goal to speedup or increase the accuracy of the original expression they input before delving deeper to explore any NaNs that could occur from the expression. The default display of results for the detector on Odyssey itself I think makes sense to output this line similar to like we talked about just as plain text.

The total number of exceptions are: 2

Based on this line of thought, I think it would make sense to:

1. If a user wants more information on the expressions, they can click a button to view the entire GPU-FPX report in a new card/modal/popup window similar to the blog you mentioned in the RA meeting this past week. This is info for the card to display for the expression:

------------ GPU-FPX Report -----------

--- FP64 Operations ---
Total NaN found:              0
Total INF found:              0
Total underflow (subnormal):  0
Total Division by 0:          0
--- FP32 Operations ---
Total NaN found:              1
Total INF found:              0
Total underflow (subnormal):  0
Total Division by 0:          1
--- Other Stats ---
Kernels:      1
The total number of exceptions are: 2

2. The next thing could also be a button to run the analyzer if desired. Output of the analyzer is messier, so we might want to come up with a simplified table structure like below showing the information gathered by the analyzer on the expression. My thought is this can also can display as a new popup/modal/card showing the information if the user decides to use the analyzer feature on that expression

Screenshot 2024-11-02 at 2 21 15 PM

What do you think about these ideas?

elmisback commented 2 weeks ago

@reporterfredbriggs those sound good! For 1, I wouldn't do anything fancy with pop-ups unless we see display issues, for now I would just dump the report output in the component and we can clean it up if the space is needed.

elmisback commented 2 weeks ago

I think we'll try to keep everything within the component rather than using pop-ups that hide other information for now. We can iterate on this later

reporterfredbriggs commented 1 day ago

Update to today:

  1. There exist fetch calls for the Analyzer and Detector in the GPU_FPX.tsx component which can use a hard coded expression with callbacks in tool-server.js to execute both

  2. Outputs of the analyzer needs to be formatted to be displayed correctly

  3. Both the Analyzer and Detector callbacks have two commands each:

    • first, to compile the program containing the expression to test
    • second, to run the LD_PRELOAD cmd with either the Analyzer or Detector and the program
  4. Currently all of this is working by running a local server for both the analyzer and detector using:

node tool-server.js --port 8003 --tool gpufpxDetector --path ~/GPU-FPX/example

and

node tool-server.js --port 8001 --tool gpufpxAnalyzer --path ~/GPU-FPX/example --host 0.0.0.0

in which GPU_FPX.tsx makes the fetch calls to those ports, and callbacks execute the commands.

  1. Currently, both GPU-FPX programs are only running upon button click of "Run Analyzer", this needs to be changed so that upon all expressions being loaded in the expression table, the detector will run with each expression in the expression table, and show the results when a user selects the GPU-FPX component in the selectable visualization, and then the user will have an option to make the additional fetch call to run the analyzer by button click on each component.

  2. Fetch calls to FPBench aren't working, still debugging the 500 Error that is occurring when trying to send the current expression, best understanding atm is that it needs to be parsed more so that it is the correct format for FPBench to be able to use.

  3. No files are uploaded to Github for users to download the tool, the structure of how they should be formatted when uploaded in terms of which files in which directory is still to be reasoned through

  4. GPU-FPX is buggy when trying to clone from GitHub and use the README to run, the current working version is a copy of Ganesh's directory for it on Beast.

  5. Functionality in extension.ts is still to be reasoned through and implemented.

  6. This branch is far behind, needs to be updated to the most recent commits in main.

Going to add more to this as I think of more things!