Skip to content

Commit

Permalink
Fix a rare CUDA compile error.
Browse files Browse the repository at this point in the history
Despite having compiled this CUDA code on many different machines, only
ozstar threw a compile error surrounding taking the absolute value of
an int8_t m_accum value and adding/subtracting it with a float. This is
fixed by pre-computing the absolute values of these m_accums and passing
them in. There appears to be no impact on performance.

While we're here, I made more pointers const. This unfortunately also
did not affect performance; maybe the compiler was already good about
doing associated optimisations.

Also remove a directive that ignored null pointer warnings; the
newest version of bindgen has fixed things.

Also tidy the body of fee_kernel; I like not having to indent code if I
don't have to.
  • Loading branch information
cjordan committed Jul 29, 2022
1 parent 701d9dc commit 7828996
Show file tree
Hide file tree
Showing 5 changed files with 748 additions and 433 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- CUDA compilation on ozstar failed because of an arithmetic operation between
two different types. Compilation has succeeded elsewhere, such as on Ubuntu,
Arch, Pawsey's garrawarla and DUG. The code has changed to prevent the issue
in the first place and no compilation issues have been spotted.
- CUDA function prototypes were being included in the C header, even if no CUDA
feature was enabled.
- The CUDA library libcudart was always statically linked by mistake. It is now
Expand Down
Loading

0 comments on commit 7828996

Please sign in to comment.