Coder Social home page Coder Social logo

Array allocation failure about pyopencl HOT 2 CLOSED

pierrepaleo avatar pierrepaleo commented on June 16, 2024
Array allocation failure

from pyopencl.

Comments (2)

inducer avatar inducer commented on June 16, 2024

cc @alexfikl (since this came from a change you made)

from pyopencl.

kif avatar kif commented on June 16, 2024

To reproduce the bug:

In [1]: import pyopencl, pyopencl.array, numpy
In [2]: ctx = pyopencl.create_some_context()
In [3]: queue = pyopencl.CommandQueue(ctx)
In [4]: ary = pyopencl.array.empty(queue, numpy.uint64(10), dtype="float32")
In [5]: ary = pyopencl.array.empty(queue, (numpy.uint64(10),), dtype="float32")
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-1e5620a87523> in <module>
----> 1 ary = pyopencl.array.empty(queue, (numpy.uint64(10),), dtype="float32")

/usr/lib/python3/dist-packages/pyopencl/array.py in __init__(***failed resolving arguments***)
    532                         context = queue.context
    533 
--> 534                     self.base_data = cl.Buffer(
    535                             context, cl.mem_flags.READ_WRITE, alloc_nbytes)
    536                 else:

TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. pyopencl._cl.Buffer(context: pyopencl._cl.Context, flags: int, size: int = 0, hostbuf: object = None)

Invoked with: <pyopencl.Context at 0x1040dd0 on <pyopencl.Device 'gfx900:xnack-' on 'AMD Accelerated Parallel Processing' at 0x1d34a20>>, 1, 40.0

from pyopencl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.