FasterTransformer
FasterTransformer copied to clipboard
PR/commits full of formatting changes - hard to parse the actual code change - codebase not formatted as .clang-format
Branch/Tag/Commit
main
Docker Image Version
n/a
GPU name
n/a
CUDA Driver
n/a
Reproduced Steps
For example, this commit https://github.com/NVIDIA/FasterTransformer/commit/b41451e6225b0a80bb9a6924660b1485407fe7ad consists of many line changes that are purely reformatting(e.g. src/fastertransformer/kernels/add_residual_kernels.cu
). It takes much longer than necessary to read and understand changes in the commit.
After some investigation, I also found that running formatting according to .clang-format produces updates on files. For example, https://github.com/NVIDIA/FasterTransformer/blob/b41451e6225b0a80bb9a6924660b1485407fe7ad/3rdparty/INIReader.h#L26 will become typedef int (*ini_handler)(void* user, const char* section, const char* name, const char* value);
with no line breaks. This seems to show that the repo was not formatted before every commit to main
.
In the future, the formatting changes in commits can be avoided by running the repo through a consistent formatter before every commit. Are there any ways we can quickly fix this and narrow down the code changes in the commits as a short-term solution?
Thank you for the suggestion. Sometime, we will update the clang file and then need to update format of many codes. We will prevent ignoring updating some files in the future.
I don't have solution for short-term.