|
Igor Gnatenko |
378375e |
From 59cd4f60e8a70a4825ece5db0201f3eca1f4260e Mon Sep 17 00:00:00 2001
|
|
|
7dda42c |
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
7dda42c |
Date: Sat, 24 Oct 2015 12:51:23 +0200
|
|
|
7dda42c |
Subject: [PATCH 1/3] use system compyte
|
|
|
7dda42c |
|
|
|
7dda42c |
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
7dda42c |
---
|
|
|
7dda42c |
pyopencl/array.py | 2 +-
|
|
|
7dda42c |
pyopencl/cffi_cl.py | 2 +-
|
|
|
7dda42c |
pyopencl/reduction.py | 2 +-
|
|
|
7dda42c |
pyopencl/tools.py | 10 +++++-----
|
|
Igor Gnatenko |
378375e |
setup.py | 12 ------------
|
|
Igor Gnatenko |
378375e |
5 files changed, 8 insertions(+), 20 deletions(-)
|
|
|
7dda42c |
|
|
|
7dda42c |
diff --git a/pyopencl/array.py b/pyopencl/array.py
|
|
Igor Gnatenko |
378375e |
index 4d5334b..8c2c050 100644
|
|
|
7dda42c |
--- a/pyopencl/array.py
|
|
|
7dda42c |
+++ b/pyopencl/array.py
|
|
|
7dda42c |
@@ -34,7 +34,7 @@ import numpy as np
|
|
|
7dda42c |
import pyopencl.elementwise as elementwise
|
|
|
7dda42c |
import pyopencl as cl
|
|
|
7dda42c |
from pytools import memoize_method
|
|
|
7dda42c |
-from pyopencl.compyte.array import (
|
|
|
7dda42c |
+from compyte.array import (
|
|
|
7dda42c |
as_strided as _as_strided,
|
|
|
7dda42c |
f_contiguous_strides as _f_contiguous_strides,
|
|
|
7dda42c |
c_contiguous_strides as _c_contiguous_strides,
|
|
|
7dda42c |
diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py
|
|
Igor Gnatenko |
378375e |
index c5effc7..f9a2ff8 100644
|
|
|
7dda42c |
--- a/pyopencl/cffi_cl.py
|
|
|
7dda42c |
+++ b/pyopencl/cffi_cl.py
|
|
Igor Gnatenko |
378375e |
@@ -37,7 +37,7 @@ import re
|
|
Igor Gnatenko |
822c27e |
from pytools import memoize_method
|
|
|
7dda42c |
|
|
|
7dda42c |
from pyopencl._cffi import ffi as _ffi
|
|
|
7dda42c |
-from .compyte.array import f_contiguous_strides, c_contiguous_strides
|
|
|
7dda42c |
+from compyte.array import f_contiguous_strides, c_contiguous_strides
|
|
|
7dda42c |
|
|
|
7dda42c |
|
|
|
7dda42c |
from pyopencl._cffi import lib as _lib
|
|
|
7dda42c |
diff --git a/pyopencl/reduction.py b/pyopencl/reduction.py
|
|
Igor Gnatenko |
822c27e |
index 7c01741..acb96d1 100644
|
|
|
7dda42c |
--- a/pyopencl/reduction.py
|
|
|
7dda42c |
+++ b/pyopencl/reduction.py
|
|
Igor Gnatenko |
822c27e |
@@ -514,7 +514,7 @@ def _get_dot_expr(dtype_out, dtype_a, dtype_b, conjugate_first,
|
|
|
7dda42c |
dtype_b = dtype_a
|
|
|
7dda42c |
|
|
|
7dda42c |
if dtype_out is None:
|
|
|
7dda42c |
- from pyopencl.compyte.array import get_common_dtype
|
|
|
7dda42c |
+ from compyte.array import get_common_dtype
|
|
|
7dda42c |
dtype_out = get_common_dtype(
|
|
|
7dda42c |
dtype_a.type(0), dtype_b.type(0),
|
|
|
7dda42c |
has_double_support)
|
|
|
7dda42c |
diff --git a/pyopencl/tools.py b/pyopencl/tools.py
|
|
Igor Gnatenko |
378375e |
index 6a72ee9..38ae708 100644
|
|
|
7dda42c |
--- a/pyopencl/tools.py
|
|
|
7dda42c |
+++ b/pyopencl/tools.py
|
|
Igor Gnatenko |
378375e |
@@ -40,13 +40,13 @@ from pytools.persistent_dict import KeyBuilder as KeyBuilderBase
|
|
|
7dda42c |
|
|
|
7dda42c |
import re
|
|
|
7dda42c |
|
|
|
7dda42c |
-from pyopencl.compyte.dtypes import ( # noqa
|
|
|
7dda42c |
+from compyte.dtypes import ( # noqa
|
|
|
7dda42c |
get_or_register_dtype, TypeNameNotKnown,
|
|
|
7dda42c |
register_dtype, dtype_to_ctype)
|
|
|
7dda42c |
|
|
|
7dda42c |
|
|
|
7dda42c |
def _register_types():
|
|
|
7dda42c |
- from pyopencl.compyte.dtypes import (
|
|
|
7dda42c |
+ from compyte.dtypes import (
|
|
|
7dda42c |
TYPE_REGISTRY, fill_registry_with_opencl_c_types)
|
|
|
7dda42c |
|
|
|
7dda42c |
fill_registry_with_opencl_c_types(TYPE_REGISTRY)
|
|
Igor Gnatenko |
378375e |
@@ -345,7 +345,7 @@ def parse_c_arg(c_arg, with_offset=False):
|
|
|
7dda42c |
else:
|
|
|
7dda42c |
vec_arg_factory = VectorArg
|
|
|
7dda42c |
|
|
|
7dda42c |
- from pyopencl.compyte.dtypes import parse_c_arg_backend
|
|
|
7dda42c |
+ from compyte.dtypes import parse_c_arg_backend
|
|
|
7dda42c |
return parse_c_arg_backend(c_arg, ScalarArg, vec_arg_factory)
|
|
|
7dda42c |
|
|
|
7dda42c |
|
|
Igor Gnatenko |
378375e |
@@ -781,7 +781,7 @@ class _TemplateRenderer(object):
|
|
|
7dda42c |
try:
|
|
|
7dda42c |
return self.type_aliases[typename]
|
|
|
7dda42c |
except KeyError:
|
|
|
7dda42c |
- from pyopencl.compyte.dtypes import NAME_TO_DTYPE
|
|
|
7dda42c |
+ from compyte.dtypes import NAME_TO_DTYPE
|
|
|
7dda42c |
return NAME_TO_DTYPE[typename]
|
|
|
7dda42c |
else:
|
|
|
7dda42c |
return np.dtype(typename)
|
|
Igor Gnatenko |
378375e |
@@ -819,7 +819,7 @@ class _TemplateRenderer(object):
|
|
|
7dda42c |
else:
|
|
|
7dda42c |
vec_arg_factory = _VectorArgPlaceholder
|
|
|
7dda42c |
|
|
|
7dda42c |
- from pyopencl.compyte.dtypes import parse_c_arg_backend
|
|
|
7dda42c |
+ from compyte.dtypes import parse_c_arg_backend
|
|
|
7dda42c |
parsed_args = []
|
|
|
7dda42c |
for arg in all_args:
|
|
|
7dda42c |
if isinstance(arg, str):
|
|
Igor Gnatenko |
378375e |
diff --git a/setup.py b/setup.py
|
|
Igor Gnatenko |
378375e |
index 3a66674..4ca9284 100644
|
|
Igor Gnatenko |
378375e |
--- a/setup.py
|
|
Igor Gnatenko |
378375e |
+++ b/setup.py
|
|
Igor Gnatenko |
378375e |
@@ -169,18 +169,6 @@ def main():
|
|
Igor Gnatenko |
378375e |
from aksetup_helper import count_down_delay
|
|
Igor Gnatenko |
378375e |
count_down_delay(delay=5)
|
|
Igor Gnatenko |
378375e |
|
|
Igor Gnatenko |
378375e |
- if not exists("pyopencl/compyte/dtypes.py"):
|
|
Igor Gnatenko |
378375e |
- print(75 * "-")
|
|
Igor Gnatenko |
378375e |
- print("You are missing important files from the pyopencl distribution.")
|
|
Igor Gnatenko |
378375e |
- print(75 * "-")
|
|
Igor Gnatenko |
378375e |
- print("You may have downloaded a zip or tar file from Github.")
|
|
Igor Gnatenko |
378375e |
- print("Those do not work, and I am unable to prevent Github from showing")
|
|
Igor Gnatenko |
378375e |
- print("them. Delete that file, and get an actual release file from the")
|
|
Igor Gnatenko |
378375e |
- print("Python package index:")
|
|
Igor Gnatenko |
378375e |
- print()
|
|
Igor Gnatenko |
378375e |
- print("https://pypi.python.org/pypi/pyopencl")
|
|
Igor Gnatenko |
378375e |
- sys.exit(1)
|
|
Igor Gnatenko |
378375e |
-
|
|
Igor Gnatenko |
378375e |
# {{{ write cffi build script
|
|
Igor Gnatenko |
378375e |
|
|
Igor Gnatenko |
378375e |
with open("cffi_build.py.in", "rt") as f:
|
|
|
7dda42c |
--
|
|
Igor Gnatenko |
378375e |
2.15.1
|
|
|
7dda42c |
|