helmholtz-analytics / heat

Distributed tensors and Machine Learning framework with GPU and MPI acceleration in Python
https://heat.readthedocs.io/
MIT License
209 stars 53 forks source link

Array API compliance #774

Open fschlimb opened 3 years ago

fschlimb commented 3 years ago

A consortium is defining an Array API: https://data-apis.org/array-api/latest/index.html

It seems desirable for HeAT to be as compliant as possible.

The following features are missing in HeAT (others are probably incomplete):

['acosh',
 'argsort',
 'asinh',
 'atanh',
 'bitwise_invert',
 'bitwise_left_shift',
 'bitwise_right_shift',
 'broadcast_arrays',
 'broadcast_to',
 'from_dlpack',
 'greater',
 'greater_equal',
 'less',
 'less_equal',
 'logaddexp',
 'meshgrid',
 'not_equal',
 'result_type',
 'sign',
 'square',
 'uint16',
 'uint32',
 'uint64']

The following features are missing in the array itself (others are probably incomplete):

['__abs__',
 '__array_namespace__',
 '__dlpack__',
 '__dlpack_device__',
 '__iadd__',
 '__iand__',
 '__iflowdiv__',
 '__ilshift__',
 '__imatmul__',
 '__imod__',
 '__imul__',
 '__ior__',
 '__ipow__',
 '__irshift__',
 '__isub__',
 '__itruediv__',
 '__ixor__',
 '__rand__',
 '__rflowdiv__',
 '__rlshift__',
 '__rmatmul__',
 '__ror__',
 '__rrshift__',
 '__rxor__']
ClaudiaComito commented 3 years ago

Thanks a lot for this list @fschlimb!

ClaudiaComito commented 3 years ago

bitwise_invert, bitwise_left_shift and bitwise_right_shift are implemented as ht.invert, ht.left_shift and ht.right_shift following the NumPy API reference.

Dhruv454000 commented 2 years ago

hello @ClaudiaComito , I would like to work on this issue as a part of gsoc. It would be great If you could guide me how can I start. I am aware of numpy but not much aware of parallel computing. I found project here:https://docs.google.com/document/d/1OKUf_n_whN0M20c__jj8R5jyGABPYYxmdBfyzto4OZk/edit

ClaudiaComito commented 1 year ago

This is still work-in-progress and being tracked in #1022.


Reviewed within #1109

ClaudiaComito commented 1 year ago

Check out https://github.com/data-apis/array-api/issues/462 for tracking and potentially signalling array API compliance, although it doesn't look like the workflow is final.

ClaudiaComito commented 2 months ago
ClaudiaComito commented 2 months ago

Re: how/whom to report compliance to, we could be contributing Heat JSON data to the array-api-comparison repository.

If I understand correctly, the JSON data are created when running the array-api-tests with the -json-report option, see example workflow here.

I managed to clone the repo and compile their tools, the result looks something like this:

Screenshot 2024-07-10 at 14 07 06

What do you think @mtar @mrfh92 ?

mtar commented 1 month ago

That repository has nothing to do with compliance. It helps comparing the names of equivalent functions in existing libraries.