diff --git a/projects/clr/.gitattributes b/projects/clr/.gitattributes new file mode 100644 index 0000000000..d5175f2f9c --- /dev/null +++ b/projects/clr/.gitattributes @@ -0,0 +1,20 @@ +# Set the default behavior, in case people don't have core.autolf set. +* text=auto + +# Explicitly declare text files you want to always be normalized and converted +# to have LF line endings on checkout. +*.c text eol=lf +*.cpp text eol=lf +*.cc text eol=lf +*.h text eol=lf +*.hpp text eol=lf +*.txt text eol=lf + +# Define files to support auto-remove trailing white space +# Need to run the command below, before add modified file(s) to the staging area +# git config filter.trimspace.clean 'sed -e "s/[[:space:]]*$//g"' +*.cpp filter=trimspace +*.c filter=trimspace +*.h filter=trimspacecpp +*.hpp filter=trimspace +*.md filter=trimspace \ No newline at end of file diff --git a/projects/clr/hipamd/include/hip/amd_detail/functional_grid_launch.hpp b/projects/clr/hipamd/include/hip/amd_detail/functional_grid_launch.hpp index 6f2857de46..2df9aa26b1 100644 --- a/projects/clr/hipamd/include/hip/amd_detail/functional_grid_launch.hpp +++ b/projects/clr/hipamd/include/hip/amd_detail/functional_grid_launch.hpp @@ -111,7 +111,7 @@ inline hip_impl::kernarg make_kernarg( kernarg.reserve(sizeof(to_formals)); auto& ps = hip_impl::get_program_state(); - return make_kernarg<0>(to_formals, + return make_kernarg<0>(to_formals, ps.get_kernargs_size_align( reinterpret_cast(kernel)), std::move(kernarg)); @@ -130,7 +130,7 @@ void hipLaunchKernelGGLImpl( hipStream_t stream, void** kernarg) { - const auto& kd = hip_impl::get_program_state().kernel_descriptor(function_address, + const auto& kd = hip_impl::get_program_state().kernel_descriptor(function_address, target_agent(stream)); hipModuleLaunchKernel(kd, numBlocks.x, numBlocks.y, numBlocks.z, diff --git a/projects/clr/hipamd/include/hip/amd_detail/helpers.hpp b/projects/clr/hipamd/include/hip/amd_detail/helpers.hpp index 5f7935c1ec..72b4ec449a 100644 --- a/projects/clr/hipamd/include/hip/amd_detail/helpers.hpp +++ b/projects/clr/hipamd/include/hip/amd_detail/helpers.hpp @@ -84,7 +84,7 @@ struct is_callable_impl::typ template auto simple_invoke(T Base::*pmd, Derived&& ref) -> decltype(static_cast(ref).*pmd); - + template auto simple_invoke(PMD&& pmd, Pointer&& ptr) -> decltype((*static_cast(ptr)).*static_cast(pmd)); @@ -92,11 +92,11 @@ auto simple_invoke(PMD&& pmd, Pointer&& ptr) template auto simple_invoke(T Base::*pmd, const std::reference_wrapper& ref) -> decltype(ref.get().*pmd); - + template auto simple_invoke(T Base::*pmf, Derived&& ref, Args&&... args) -> decltype((static_cast(ref).*pmf)(static_cast(args)...)); - + template auto simple_invoke(PMF&& pmf, Pointer&& ptr, Args&&... args) -> decltype(((*static_cast(ptr)).*static_cast(pmf))(static_cast(args)...)); @@ -106,7 +106,7 @@ auto simple_invoke(T Base::*pmf, const std::reference_wrapper& ref, Arg -> decltype((ref.get().*pmf)(static_cast(args)...)); template -auto simple_invoke(F&& f, Ts&&... xs) +auto simple_invoke(F&& f, Ts&&... xs) -> decltype(f(static_cast(xs)...)); template diff --git a/projects/clr/hipamd/src/hip_code_object.hpp b/projects/clr/hipamd/src/hip_code_object.hpp index f0407f7bd4..53e2f48fab 100644 --- a/projects/clr/hipamd/src/hip_code_object.hpp +++ b/projects/clr/hipamd/src/hip_code_object.hpp @@ -95,7 +95,7 @@ class CodeObject { static hipError_t extractCodeObjectFromFatBinary(const void*, const std::vector&, std::vector>&); - + CodeObject() {} private: friend const std::vector& modules(); diff --git a/projects/clr/hipamd/src/hip_error.cpp b/projects/clr/hipamd/src/hip_error.cpp index b6a04ffb10..41c608a0b4 100644 --- a/projects/clr/hipamd/src/hip_error.cpp +++ b/projects/clr/hipamd/src/hip_error.cpp @@ -354,9 +354,9 @@ const char *ihipGetErrorString(hipError_t hip_error) { } } -const char* hipGetErrorName(hipError_t hip_error) -{ - return ihipGetErrorName(hip_error); +const char* hipGetErrorName(hipError_t hip_error) +{ + return ihipGetErrorName(hip_error); } const char *hipGetErrorString(hipError_t hip_error) diff --git a/projects/clr/hipamd/src/hip_module.cpp b/projects/clr/hipamd/src/hip_module.cpp index 4f7ef96a48..c67d06eec2 100644 --- a/projects/clr/hipamd/src/hip_module.cpp +++ b/projects/clr/hipamd/src/hip_module.cpp @@ -328,7 +328,7 @@ hipError_t ihipLaunchKernelCommand(amd::Command*& command, hipFunction_t f, kernelCommand->release(); return hipErrorOutOfMemory; } - + } else { for (size_t i = 0; i < kernel->signature().numParameters(); ++i) { const amd::KernelParameterDescriptor& desc = kernel->signature().at(i); diff --git a/projects/clr/hipamd/src/hip_vm.hpp b/projects/clr/hipamd/src/hip_vm.hpp index de7bf881e4..678c480175 100644 --- a/projects/clr/hipamd/src/hip_vm.hpp +++ b/projects/clr/hipamd/src/hip_vm.hpp @@ -36,7 +36,7 @@ class GenericAllocation : public amd::RuntimeObject { hipMemAllocationProp properties_; //