Skip to content

Commit

Permalink
[docs] [core] link to file in repo with list of accelerator types (ra…
Browse files Browse the repository at this point in the history
…y-project#40504)

In the docs for ray remote, I see:
accelerator_type – If specified, requires that the task or actor run on a node with the specified type of accelerator. See ray.util.accelerators for accelerator types.
It will be nice to have a link for ray.util.accelerators (https://github.com/ray-project/ray/blob/master/python/ray/util/accelerators/accelerators.py)

Request from @sriram-anyscale.

Signed-off-by: angelinalg <[email protected]>
  • Loading branch information
angelinalg authored Nov 2, 2023
1 parent 99f7671 commit 0f74bc8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
11 changes: 11 additions & 0 deletions doc/source/ray-core/accelerator-types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:orphan:

.. _accelerator_types:

Accelerator Types
=================

Ray supports the following accelerator types:

.. literalinclude:: ../../../python/ray/util/accelerators/accelerators.py
:language: python
2 changes: 1 addition & 1 deletion python/ray/_private/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3281,7 +3281,7 @@ def method(self):
By default it is empty.
accelerator_type: If specified, requires that the task or actor run
on a node with the specified type of accelerator.
See `ray.util.accelerators` for accelerator types.
See :ref:`accelerator types <accelerator_types>`.
memory: The heap memory request in bytes for this task/actor,
rounded down to the nearest integer.
max_calls: Only for *remote functions*. This specifies the
Expand Down
3 changes: 2 additions & 1 deletion python/ray/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ class _ActorClassMetadata:
resources: The default resources required by the actor creation task.
accelerator_type: The specified type of accelerator required for the
node on which this actor runs.
See :ref:`accelerator types <accelerator_types>`.
runtime_env: The runtime environment for this actor.
scheduling_strategy: Strategy about how to schedule this actor.
last_export_session_and_job: A pair of the last exported session
Expand Down Expand Up @@ -591,7 +592,7 @@ def options(self, **actor_options):
This is a dictionary mapping strings (resource names) to floats.
accelerator_type: If specified, requires that the task or actor run
on a node with the specified type of accelerator.
See `ray.util.accelerators` for accelerator types.
See :ref:`accelerator types <accelerator_types>`.
memory: The heap memory request in bytes for this task/actor,
rounded down to the nearest integer.
object_store_memory: The object store memory request for actors only.
Expand Down
2 changes: 1 addition & 1 deletion python/ray/remote_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def options(self, **task_options):
This is a dictionary mapping strings (resource names) to floats.
accelerator_type: If specified, requires that the task or actor run
on a node with the specified type of accelerator.
See `ray.util.accelerators` for accelerator types.
See :ref:`accelerator types <accelerator_types>`.
memory: The heap memory request in bytes for this task/actor,
rounded down to the nearest integer.
object_store_memory: The object store memory request for actors only.
Expand Down
1 change: 1 addition & 0 deletions python/ray/serve/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ class RayActorOptionsSchema(BaseModel):
default=None,
description=(
"Forces replicas to run on nodes with the specified accelerator type."
"See :ref:`accelerator types <accelerator_types>`."
),
)

Expand Down

0 comments on commit 0f74bc8

Please sign in to comment.