Skip to content

Commit a4e1b1b

Browse files
committed
Remove the hackish API version number and add a proper SOVERSION.
1 parent fde02d2 commit a4e1b1b

5 files changed

Lines changed: 1 addition & 18 deletions

File tree

pygpu/gpuarray.pxd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ cdef extern from "gpuarray/types.h":
4949
GA_NBASE
5050

5151
cdef extern from "gpuarray/util.h":
52-
const int gpuarray_api_major
53-
const int gpuarray_api_minor
5452
int gpuarray_register_type(gpuarray_type *t, int *ret)
5553
size_t gpuarray_get_elsize(int typecode)
5654
gpuarray_type *gpuarray_get_type(int typecode)

pygpu/gpuarray.pyx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ import numpy as np
99
from cpython cimport Py_INCREF, PyNumber_Index
1010
from cpython.object cimport Py_EQ, Py_NE
1111

12-
def api_version():
13-
# major, minor, py
14-
return (gpuarray_api_major, gpuarray_api_minor, 0)
15-
1612
np.import_array()
1713

1814
# to export the numeric value
@@ -564,12 +560,6 @@ def init(dev, sched='default', disable_alloc_cache=False, single_stream=False):
564560
are no gaps in the valid numbers.
565561
"""
566562
cdef int flags = 0
567-
expected_version = -9997
568-
if gpuarray_api_major != expected_version or gpuarray_api_minor < 0:
569-
raise RuntimeError(
570-
"Pygpu was expecting libgpuarray version %d, but %d is available. "
571-
"Recompile it to avoid problems.",
572-
expected_version, gpuarray_api_major)
573563
if sched == 'single':
574564
flags |= GA_CTX_SINGLE_THREAD
575565
elif sched == 'multi':

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ set_target_properties(gpuarray PROPERTIES
8787
COMPILE_FLAGS "-DGPUARRAY_BUILDING_DLL -DGPUARRAY_SHARED"
8888
INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib
8989
MACOSX_RPATH OFF
90+
VERSION 0.0
9091
)
9192

9293
add_library(gpuarray-static STATIC ${GPUARRAY_SRC})

src/gpuarray/util.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ extern "C" {
1515
#include <gpuarray/elemwise.h>
1616
#include <gpuarray/types.h>
1717

18-
extern GPUARRAY_PUBLIC const int gpuarray_api_major;
19-
extern GPUARRAY_PUBLIC const int gpuarray_api_minor;
20-
2118
/**
2219
* Registers a type with the kernel machinery.
2320
*

src/gpuarray_util.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
* phase. Once we go stable, this will move to 0 and go up from
1414
* there.
1515
*/
16-
const int gpuarray_api_major = -9997;
17-
const int gpuarray_api_minor = 1;
18-
1916
static gpuarray_type **custom_types = NULL;
2017
static int n_types = 0;
2118
static gpuarray_type no_type = {NULL, 0, 0, -1};

0 commit comments

Comments
 (0)