From 9317bc4f034aa9624ecf4d6d8f45b78ea844687f Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Sun, 18 Nov 2018 18:41:00 -0600 Subject: [PATCH 1/4] Documentation fixes --- doc/index.rst | 10 +++++----- doc/ref_kernel.rst | 2 +- examples/python/hello-loopy.loopy | 2 +- loopy/kernel/data.py | 2 +- loopy/transform/add_barrier.py | 8 ++++---- loopy/transform/batch.py | 1 + loopy/transform/buffer.py | 2 +- loopy/transform/iname.py | 2 -- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index d862a8acd..b77bbb16f 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -25,18 +25,18 @@ Want to try out loopy? There's no need to go through :ref:`installation` if you'd just like to get a feel for what loopy is. Instead, you may -`download a self-contained Linux binary `_. +`download a self-contained Linux binary `_. This is purposefully built on an ancient Linux distribution, so it should work on most versions of Linux that are currently out there. Once you have the binary, do the following:: chmod +x ./loopy-centos6 - ./loopy-centos6 --target=opencl hello-loopy-lp.py - ./loopy-centos6 --target=cuda hello-loopy-lp.py - ./loopy-centos6 --target=ispc hello-loopy-lp.py + ./loopy-centos6 --target=opencl hello-loopy.loopy + ./loopy-centos6 --target=cuda hello-loopy.loopy + ./loopy-centos6 --target=ispc hello-loopy.loopy -Grab the example here: :download:`examples/python/hello-loopy.py <../examples/python/hello-loopy-lp.py>`. +Grab the example here: :download:`examples/python/hello-loopy.loopy <../examples/python/hello-loopy.loopy>`. You may also donwload the most recent version by going to the `list of builds `_, clicking on the newest one diff --git a/doc/ref_kernel.rst b/doc/ref_kernel.rst index c9ce20626..62d76c779 100644 --- a/doc/ref_kernel.rst +++ b/doc/ref_kernel.rst @@ -406,7 +406,7 @@ Arguments :members: :undoc-members: -.. autoclass:: GlobalArg +.. autofunction:: GlobalArg :members: :undoc-members: diff --git a/examples/python/hello-loopy.loopy b/examples/python/hello-loopy.loopy index 0ba44d6ec..7f7973098 100644 --- a/examples/python/hello-loopy.loopy +++ b/examples/python/hello-loopy.loopy @@ -1,7 +1,7 @@ # This is a version of hello-loopy.py that can be run through # a loopy binary using # -# ./loopy --lang=loopy hello-loopy-lp.py - +# ./loopy --lang=loopy hello-loopy.loopy - knl = lp.make_kernel( "{ [i]: 0<=i Date: Sun, 18 Nov 2018 18:48:12 -0600 Subject: [PATCH 2/4] More fixes --- doc/ref_kernel.rst | 2 -- doc/tutorial.rst | 2 +- loopy/kernel/__init__.py | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/ref_kernel.rst b/doc/ref_kernel.rst index 62d76c779..11ec7f030 100644 --- a/doc/ref_kernel.rst +++ b/doc/ref_kernel.rst @@ -407,8 +407,6 @@ Arguments :undoc-members: .. autofunction:: GlobalArg - :members: - :undoc-members: .. autoclass:: ConstantArg :members: diff --git a/doc/tutorial.rst b/doc/tutorial.rst index 1272d2a59..73f5dea75 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -1361,7 +1361,7 @@ code-generation however additional implementation may be required for custom functions. The full lists of available functions may be found in a the :class:`TargetBase` implementation (e.g. :class:`CudaTarget`) -Custom user functions may be represented using the method described in :ref:`_functions` +Custom user functions may be represented using the method described in :ref:`functions` Data-dependent control flow diff --git a/loopy/kernel/__init__.py b/loopy/kernel/__init__.py index 6b0033808..e3342d0f9 100644 --- a/loopy/kernel/__init__.py +++ b/loopy/kernel/__init__.py @@ -142,7 +142,7 @@ class LoopKernel(ImmutableRecordWithoutPickling): .. note:: This data structure and its attributes should be considered immutable, - even if it contains mutable data types. See :method:`copy` for an easy + even if it contains mutable data types. See :meth:`copy` for an easy way of producing a modified copy. .. attribute:: domains -- GitLab From 18ded6348d7c56c1d8994d7f0c412d9eb2337ed8 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Mon, 19 Nov 2018 17:11:31 -0600 Subject: [PATCH 3/4] Fix a broken doc entry --- loopy/kernel/array.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/loopy/kernel/array.py b/loopy/kernel/array.py index 6bf733a84..bae9d7d1f 100644 --- a/loopy/kernel/array.py +++ b/loopy/kernel/array.py @@ -549,15 +549,15 @@ class ArrayBase(ImmutableRecord): .. attribute :: name .. attribute :: dtype - the :class:`loopy.loopytype` of the array. - if this is *none*, :mod:`loopy` will try to continue without - knowing the type of this array, where the idea is that precise - knowledge of the type will become available at invocation time. - :class:`loopy.compiledkernel` (and thereby - :meth:`loopy.loopkernel.__call__`) automatically add this type - information based on invocation arguments. - - note that some transformations, such as :func:`loopy.add_padding` + + The :class:`loopy.types.LoopyType` of the array. If this is *None*, + :mod:`loopy` will try to continue without knowing the type of this + array, where the idea is that precise knowledge of the type will become + available at invocation time. Calling the kernel + (via :meth:`loopy.LoopKernel.__call__`) + automatically adds this type information based on invocation arguments. + + Note that some transformations, such as :func:`loopy.add_padding` cannot be performed without knowledge of the exact *dtype*. .. attribute :: shape -- GitLab From 9cfdd91bdf1b613dc72e96ed4bc70d3b67223163 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Wed, 21 Nov 2018 00:03:54 -0600 Subject: [PATCH 4/4] Change GlobalArg to ArrayArg --- doc/ref_kernel.rst | 6 ++++-- loopy/kernel/data.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/ref_kernel.rst b/doc/ref_kernel.rst index 11ec7f030..896388d29 100644 --- a/doc/ref_kernel.rst +++ b/doc/ref_kernel.rst @@ -406,7 +406,9 @@ Arguments :members: :undoc-members: -.. autofunction:: GlobalArg +.. autoclass:: ArrayArg + :members: + :undoc-members: .. autoclass:: ConstantArg :members: @@ -591,7 +593,7 @@ Do not create :class:`LoopKernel` objects directly. Instead, refer to Implementation Detail: The Base Array ------------------------------------- -All array-like data in :mod:`loopy` (such as :class:`GlobalArg` and +All array-like data in :mod:`loopy` (such as :class:`ArrayArg` and :class:`TemporaryVariable`) derive from single, shared base array type, described next. diff --git a/loopy/kernel/data.py b/loopy/kernel/data.py index d6490aa88..7877f8b93 100644 --- a/loopy/kernel/data.py +++ b/loopy/kernel/data.py @@ -49,7 +49,7 @@ from warnings import warn class auto(object): # noqa """A generic placeholder object for something that should be automatically determined. See, for example, the *shape* or *strides* argument of - :func:`GlobalArg`. + :class:`ArrayArg`. """ -- GitLab