Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

dpctl.tensor.max returns incorrect result when reducing over axis=0 #1455

Copy link
Copy link
@antonwolfy

Description

@antonwolfy
Issue body actions

After installing newer dpctl version:

$ conda install dpctl=0.15.1dev0 -c dppy/label/dev --override-channels
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/xantvol/miniconda3/envs/dpnp_dev

  added / updated specs:
    - dpctl=0.15.1dev0


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    dpctl-0.15.1dev0           |  py39ha25a700_63        12.2 MB  dppy/label/dev
    ------------------------------------------------------------
                                           Total:        12.2 MB

The following packages will be UPDATED:

  dpctl                          0.15.1dev0-py39ha25a700_42 --> 0.15.1dev0-py39ha25a700_63

the below example with max reduction has been broken:

import numpy, dpctl, dpctl.tensor as dpt

dpctl.__version__
# Out: '0.15.1dev0+63.g03fd73794'

dt = numpy.int32
a = numpy.array([[[-2.0, 3.0], [9.1, 0.2]],
                 [[-2.0, 5.0], [-2, -1.2]],
                 [[1.0, -2.0], [5.0, -1.1]]], dtype=dt)
b = dpt.asarray(a)

numpy.max(a, axis=0)
# Out:
array([[1, 5],
       [9, 0]], dtype=int32)

dpt.max(b, axis=0)
# Out:
usm_ndarray([[9, 5],
             [1, 5]], dtype=int32)
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.