mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-26 15:58:14 +08:00
jagrit's commit files
This commit is contained in:
52
docs/src/python/data_types.rst
Normal file
52
docs/src/python/data_types.rst
Normal file
@@ -0,0 +1,52 @@
|
||||
.. _data_types:
|
||||
|
||||
:orphan:
|
||||
|
||||
Data Types
|
||||
==========
|
||||
|
||||
.. currentmodule:: mlx.core
|
||||
|
||||
The default floating point type is ``float32`` and the default integer type is
|
||||
``int32``. The table below shows supported values for :obj:`Dtype`.
|
||||
|
||||
.. list-table:: Supported Data Types
|
||||
:widths: 5 3 20
|
||||
:header-rows: 1
|
||||
|
||||
* - Type
|
||||
- Bytes
|
||||
- Description
|
||||
* - ``bool_``
|
||||
- 1
|
||||
- Boolean (``True``, ``False``) data type
|
||||
* - ``uint8``
|
||||
- 1
|
||||
- 8-bit unsigned integer
|
||||
* - ``uint16``
|
||||
- 2
|
||||
- 16-bit unsigned integer
|
||||
* - ``uint32``
|
||||
- 4
|
||||
- 32-bit unsigned integer
|
||||
* - ``uint32``
|
||||
- 8
|
||||
- 32-bit unsigned integer
|
||||
* - ``int8``
|
||||
- 1
|
||||
- 8-bit signed integer
|
||||
* - ``int16``
|
||||
- 2
|
||||
- 16-bit signed integer
|
||||
* - ``int32``
|
||||
- 4
|
||||
- 32-bit signed integer
|
||||
* - ``int64``
|
||||
- 8
|
||||
- 64-bit signed integer
|
||||
* - ``float16``
|
||||
- 2
|
||||
- 16-bit float, only available with `ARM C language extensions <https://developer.arm.com/documentation/101028/0012/3--C-language-extensions?lang=en>`_
|
||||
* - ``float32``
|
||||
- 4
|
||||
- 32-bit float
|
17
docs/src/python/devices_and_streams.rst
Normal file
17
docs/src/python/devices_and_streams.rst
Normal file
@@ -0,0 +1,17 @@
|
||||
.. _devices_and_streams:
|
||||
|
||||
Devices and Streams
|
||||
===================
|
||||
|
||||
.. currentmodule:: mlx.core
|
||||
|
||||
.. autosummary::
|
||||
:toctree: _autosummary
|
||||
|
||||
Device
|
||||
default_device
|
||||
set_default_device
|
||||
Stream
|
||||
default_stream
|
||||
new_stream
|
||||
set_default_stream
|
16
docs/src/python/transforms.rst
Normal file
16
docs/src/python/transforms.rst
Normal file
@@ -0,0 +1,16 @@
|
||||
.. _transforms:
|
||||
|
||||
Transforms
|
||||
==========
|
||||
|
||||
.. currentmodule:: mlx.core
|
||||
|
||||
.. autosummary::
|
||||
:toctree: _autosummary
|
||||
|
||||
eval
|
||||
grad
|
||||
value_and_grad
|
||||
jvp
|
||||
vjp
|
||||
vmap
|
21
docs/src/python/tree_utils.rst
Normal file
21
docs/src/python/tree_utils.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
.. _utils:
|
||||
|
||||
Tree Utils
|
||||
==========
|
||||
|
||||
In MLX we consider a python tree to be an arbitrarily nested collection of
|
||||
dictionaries, lists and tuples without cycles. Functions in this module that
|
||||
return python trees will be using the default python ``dict``, ``list`` and
|
||||
``tuple`` but they can usually process objects that inherit from any of these.
|
||||
|
||||
.. note::
|
||||
Dictionaries should have keys that are valid python identifiers.
|
||||
|
||||
.. currentmodule:: mlx.utils
|
||||
|
||||
.. autosummary::
|
||||
:toctree: _autosummary
|
||||
|
||||
tree_flatten
|
||||
tree_unflatten
|
||||
tree_map
|
Reference in New Issue
Block a user