Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a clang-tidy file and clang-tidy target to the make file.
Since the .cu files are in flux right now, this is just looking at gpt2.c
I'm not quite sure which checks we should enable, but I think the ones that I've selected should be a good starting point.
In particular, there is one warning about using the result of 32-bit matrix multiplications as an offset in a pointer operation -- that seems like a good one to have, to prevent stuff like the high batch-size crashes.
Regarding the "fixes" I've made to ensure we don't get these warnings, I'm not 100% sure about those, and even more so about using ptrdiff_t vs size_t.
(using size_t for the local B, T, etc variables gets us 64-bit offset calculations, but also implementation-defined narrowing once we call the actual kernels)