From d946d01e2b72d56ff3f6a61ae85f3da7b26e87b5 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Wed, 2 May 2018 07:08:36 +0000 Subject: [PATCH 1/3] follow cpplint --- paddle/cuda/include/hl_base.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/paddle/cuda/include/hl_base.h b/paddle/cuda/include/hl_base.h index b979aa7723..a42ace5bca 100644 --- a/paddle/cuda/include/hl_base.h +++ b/paddle/cuda/include/hl_base.h @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#ifndef HL_BASE_H_ -#define HL_BASE_H_ +#ifndef PADDLE_CUDA_INCLUDE_HL_BASE_H_ +#define PADDLE_CUDA_INCLUDE_HL_BASE_H_ #include @@ -207,8 +207,8 @@ typedef struct { #ifdef __NVCC__ -#include "cuda_runtime.h" -#include "hl_cuda.h" +#include "./cuda_runtime.h" +#include "./hl_cuda.h" #include "paddle/utils/Logging.h" extern __thread bool g_sync_flag; @@ -243,6 +243,6 @@ __shfl_sync(unsigned, T val, int src_line, int width) { mask = __ballot_sync(FULL_WARP_MASK, (predicate)) #endif -#endif /* __NVCC__ */ +#endif // __NVCC__ -#endif /* HL_BASE_H_ */ +#endif // PADDLE_CUDA_INCLUDE_HL_BASE_H_ From ac266dfb8d91ce129ccab35524825833444901ed Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Wed, 2 May 2018 07:33:44 +0000 Subject: [PATCH 2/3] follow cpplint --- paddle/cuda/include/hl_base.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/paddle/cuda/include/hl_base.h b/paddle/cuda/include/hl_base.h index a42ace5bca..9bddf830bb 100644 --- a/paddle/cuda/include/hl_base.h +++ b/paddle/cuda/include/hl_base.h @@ -12,8 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#ifndef PADDLE_CUDA_INCLUDE_HL_BASE_H_ -#define PADDLE_CUDA_INCLUDE_HL_BASE_H_ +#pragma once #include @@ -244,5 +243,3 @@ __shfl_sync(unsigned, T val, int src_line, int width) { #endif #endif // __NVCC__ - -#endif // PADDLE_CUDA_INCLUDE_HL_BASE_H_ From 1e28ba763994ebdda22004dcc293b5a9e3a540af Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Wed, 2 May 2018 08:25:32 +0000 Subject: [PATCH 3/3] follow comments --- paddle/cuda/include/hl_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/cuda/include/hl_base.h b/paddle/cuda/include/hl_base.h index 9bddf830bb..402302a5bf 100644 --- a/paddle/cuda/include/hl_base.h +++ b/paddle/cuda/include/hl_base.h @@ -206,8 +206,8 @@ typedef struct { #ifdef __NVCC__ -#include "./cuda_runtime.h" -#include "./hl_cuda.h" +#include +#include "paddle/cuda/include/hl_cuda.h" #include "paddle/utils/Logging.h" extern __thread bool g_sync_flag;