<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123092>123092</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AMDGPU][Attributor] OpenMC Performance Regression on AMD GPU
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jtramm
</td>
</tr>
</table>
<pre>
I have observed a performance regression in the OpenMC scientific simulation application (which uses OpenMP target offloading) on the AMD MI250 due to commit https://github.com/llvm/llvm-project/commit/7dbd6cd2946ec3a9b4ad2dfd7ead177baac15bd7, which is part of PR #114357. The regression is not observed on NVIDIA GPUs.
This commit causes OpenMC to be 20% slower overall on a typical benchmark problem, with the most expensive kernel in the simulation being about 2x slower.
OpenMC can be installed and its performance benchmark run using the following script: https://github.com/jtramm/openmc_offloading_builder/tree/main
FOM before this commit (higher is better):
```
Calculation Rate (inactive) = 239870.0 particles/second
```
FOM after this commit:
```
Calculation Rate (inactive) = 192707.0 particles/second
```
Main kernel timing before this commit:
```
XS lookups (Fuel) = 1.8720e+01 seconds
```
Main kernel after this commit:
```
XS lookups (Fuel) = 3.5231e+01 seconds
```
Rocprof shows similar slowdown for this kernel, which it lists as:
```
__omp_offloading_25_7c638f81__ZN6openmc32process_calculate_xs_events_fuelEv_l256.kd
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyclVFv2zYQxz8N_XKYIVKWZD34wY2nIA9ujawZhr0IJHWy2FCkQFJ2-u0HSjbsdFvbTQhiGebxfvz_j3fce3U0iBuSfSDZbsHH0Fm3-RIc7_uFsM3XzRN0_IRghUd3wgY4DOha63puJILDo0PvlTWgDIQO4dOAZv8AXio0QbVKglf9qHmIa_gwaCXnd8LW507JDkaPfg47QODuiAFs22rLG2WOhJVg5523-x3sn1iWQDMiBAvS9r0K0IUweJJuCasIq44qdKNYStsTVml9un78Mjj7BWUgrJrj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