arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject arrow git commit: ARROW-1399: [C++] Add CUDA build version defines in public headers
Date Sun, 27 Aug 2017 10:08:10 GMT
Repository: arrow
Updated Branches:
  refs/heads/master b36aab5ab -> 26d4e3f59


ARROW-1399: [C++] Add CUDA build version defines in public headers

When configured, this looks like:

```
#define ARROW_CUDA_ABI_VERSION_MAJOR 8
#define ARROW_CUDA_ABI_VERSION_MINOR 0
```

I'm not sure how to use this yet. It would be nice if we could work out how to enable thirdparty
users to detect incompatibility with their nvcc at compiler time

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #990 from wesm/ARROW-1399 and squashes the following commits:

1ad6966 [Wes McKinney] Add CUDA build version defines in public headers


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/26d4e3f5
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/26d4e3f5
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/26d4e3f5

Branch: refs/heads/master
Commit: 26d4e3f593d2007a9cc462ff13375e85b49c34f4
Parents: b36aab5
Author: Wes McKinney <wes.mckinney@twosigma.com>
Authored: Sun Aug 27 12:08:03 2017 +0200
Committer: Uwe L. Korn <uwelk@xhochy.com>
Committed: Sun Aug 27 12:08:03 2017 +0200

----------------------------------------------------------------------
 cpp/src/arrow/gpu/CMakeLists.txt    |  9 +++++++++
 cpp/src/arrow/gpu/cuda_api.h        | 24 ++++++++++++++++++++++++
 cpp/src/arrow/gpu/cuda_version.h.in | 25 +++++++++++++++++++++++++
 3 files changed, 58 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/26d4e3f5/cpp/src/arrow/gpu/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/gpu/CMakeLists.txt b/cpp/src/arrow/gpu/CMakeLists.txt
index 9fc9efa..cab0853 100644
--- a/cpp/src/arrow/gpu/CMakeLists.txt
+++ b/cpp/src/arrow/gpu/CMakeLists.txt
@@ -114,6 +114,15 @@ install(
   FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow-gpu.pc"
   DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
 
+# CUDA build version
+configure_file(cuda_version.h.in
+  "${CMAKE_CURRENT_BINARY_DIR}/cuda_version.h"
+  @ONLY)
+
+install(FILES
+  "${CMAKE_CURRENT_BINARY_DIR}/cuda_version.h"
+  DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/gpu")
+
 set(ARROW_GPU_TEST_LINK_LIBS
   arrow_gpu_shared
   ${ARROW_TEST_LINK_LIBS})

http://git-wip-us.apache.org/repos/asf/arrow/blob/26d4e3f5/cpp/src/arrow/gpu/cuda_api.h
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/gpu/cuda_api.h b/cpp/src/arrow/gpu/cuda_api.h
new file mode 100644
index 0000000..a70e0af
--- /dev/null
+++ b/cpp/src/arrow/gpu/cuda_api.h
@@ -0,0 +1,24 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, 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 ARROW_GPU_CUDA_API_H
+#define ARROW_GPU_CUDA_API_H
+
+#include "arrow/gpu/cuda_memory.h"
+#include "arrow/gpu/cuda_version.h"
+
+#endif // ARROW_GPU_CUDA_API_H

http://git-wip-us.apache.org/repos/asf/arrow/blob/26d4e3f5/cpp/src/arrow/gpu/cuda_version.h.in
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/gpu/cuda_version.h.in b/cpp/src/arrow/gpu/cuda_version.h.in
new file mode 100644
index 0000000..bc68768
--- /dev/null
+++ b/cpp/src/arrow/gpu/cuda_version.h.in
@@ -0,0 +1,25 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, 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 ARROW_GPU_CUDA_VERSION_H
+#define ARROW_GPU_CUDA_VERSION_H
+
+// Set the CUDA version used to build the library
+#define ARROW_CUDA_ABI_VERSION_MAJOR @CUDA_VERSION_MAJOR@
+#define ARROW_CUDA_ABI_VERSION_MINOR @CUDA_VERSION_MINOR@
+
+#endif // ARROW_GPU_CUDA_VERSION_H


Mime
View raw message