You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2021/01/13 16:09:26 UTC

[tvm] branch main updated: Change the all #pragma once to ifdef include guard (#7264)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 1410e68  Change the all #pragma once to ifdef include guard (#7264)
1410e68 is described below

commit 1410e6820c70d0fdbc9b5e711291be0854837b01
Author: Robert Kimball <bo...@gmail.com>
AuthorDate: Wed Jan 13 08:09:09 2021 -0800

    Change the all #pragma once to ifdef include guard (#7264)
---
 src/runtime/contrib/cblas/gemm_common.h | 5 ++++-
 src/runtime/vulkan/vulkan_common.h      | 5 ++++-
 src/runtime/vulkan/vulkan_module.h      | 5 ++++-
 src/runtime/vulkan/vulkan_shader.h      | 5 ++++-
 src/runtime/vulkan/vulkan_stream.h      | 5 ++++-
 5 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/runtime/contrib/cblas/gemm_common.h b/src/runtime/contrib/cblas/gemm_common.h
index 6c31fbd..9ccfa51 100644
--- a/src/runtime/contrib/cblas/gemm_common.h
+++ b/src/runtime/contrib/cblas/gemm_common.h
@@ -21,7 +21,9 @@
  * \file tvm/contrib/gemm.h
  * \brief Shared implementation of gemm
  */
-#pragma once
+
+#ifndef TVM_RUNTIME_CONTRIB_CBLAS_GEMM_COMMON_H_
+#define TVM_RUNTIME_CONTRIB_CBLAS_GEMM_COMMON_H_
 
 #include <tvm/runtime/data_type.h>
 #include <tvm/runtime/registry.h>
@@ -215,3 +217,4 @@ inline void CallBatchGemm(TVMArgs args, TVMRetValue* ret, TBatchGemmOp op) {
 
 }  // namespace contrib
 }  // namespace tvm
+#endif  // TVM_RUNTIME_CONTRIB_CBLAS_GEMM_COMMON_H_
diff --git a/src/runtime/vulkan/vulkan_common.h b/src/runtime/vulkan/vulkan_common.h
index da604f6..9cd1f25 100644
--- a/src/runtime/vulkan/vulkan_common.h
+++ b/src/runtime/vulkan/vulkan_common.h
@@ -16,7 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#pragma once
+
+#ifndef TVM_RUNTIME_VULKAN_VULKAN_COMMON_H_
+#define TVM_RUNTIME_VULKAN_VULKAN_COMMON_H_
 
 #include <tvm/runtime/c_runtime_api.h>
 #include <tvm/runtime/device_api.h>
@@ -143,3 +145,4 @@ struct VulkanContext {
 }  // namespace vulkan
 }  // namespace runtime
 }  // namespace tvm
+#endif  // TVM_RUNTIME_VULKAN_VULKAN_COMMON_H_
diff --git a/src/runtime/vulkan/vulkan_module.h b/src/runtime/vulkan/vulkan_module.h
index 15c9ec3..c75a077 100644
--- a/src/runtime/vulkan/vulkan_module.h
+++ b/src/runtime/vulkan/vulkan_module.h
@@ -16,7 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#pragma once
+
+#ifndef TVM_RUNTIME_VULKAN_VULKAN_MODULE_H_
+#define TVM_RUNTIME_VULKAN_VULKAN_MODULE_H_
 
 #include <string>
 #include <unordered_map>
@@ -35,3 +37,4 @@ Module VulkanModuleCreate(std::unordered_map<std::string, VulkanShader> smap,
 using vulkan::VulkanModuleCreate;
 }  // namespace runtime
 }  // namespace tvm
+#endif  // TVM_RUNTIME_VULKAN_VULKAN_MODULE_H_
diff --git a/src/runtime/vulkan/vulkan_shader.h b/src/runtime/vulkan/vulkan_shader.h
index 7558a95..c9fbb13 100644
--- a/src/runtime/vulkan/vulkan_shader.h
+++ b/src/runtime/vulkan/vulkan_shader.h
@@ -16,7 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#pragma once
+
+#ifndef TVM_RUNTIME_VULKAN_VULKAN_SHADER_H_
+#define TVM_RUNTIME_VULKAN_VULKAN_SHADER_H_
 
 #include <tvm/runtime/c_runtime_api.h>
 #include <tvm/runtime/device_api.h>
@@ -55,3 +57,4 @@ using vulkan::VulkanShader;
 namespace dmlc {
 DMLC_DECLARE_TRAITS(has_saveload, ::tvm::runtime::vulkan::VulkanShader, true);
 }  // namespace dmlc
+#endif  // TVM_RUNTIME_VULKAN_VULKAN_SHADER_H_
diff --git a/src/runtime/vulkan/vulkan_stream.h b/src/runtime/vulkan/vulkan_stream.h
index c5094bd..d096a64 100644
--- a/src/runtime/vulkan/vulkan_stream.h
+++ b/src/runtime/vulkan/vulkan_stream.h
@@ -16,7 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-#pragma once
+
+#ifndef TVM_RUNTIME_VULKAN_VULKAN_STREAM_H_
+#define TVM_RUNTIME_VULKAN_VULKAN_STREAM_H_
 
 #include <functional>
 #include <memory>
@@ -184,3 +186,4 @@ class VulkanStream {
 }  // namespace vulkan
 }  // namespace runtime
 }  // namespace tvm
+#endif  // TVM_RUNTIME_VULKAN_VULKAN_STREAM_H_