GPU#

class jtop.core.gpu.GPU#

Bases: GenericInterface

This class get the output from your GPU, this class is readable like a dictionary, please read the documentation on gpu but is also usable to enable, disable 3d scaling on your device.

with jtop() as jetson:
    if jetson.ok():
        jetson.gpu.set_scaling_3D("gpu", True)

Below all methods available using the gpu attribute

get_scaling_3D(name)#

Return status of 3D scaling, this output is also readable from gpu attribute

Parameters:

name (str) – GPU name

Raises:

JtopException – if GPU doesn’t exist

Returns:

status 3D scaling

Return type:

bool

property scaling_3D#

Return status of 3D scaling, this output is also readable from gpu attribute

with jtop() as jetson:
    if jetson.ok():
        # Set new 3D scaling
        jetson.gpu.set_scaling_3D = True
        # same of
        jetson.gpu.set_scaling_3D("ga10b", True)
Raises:

JtopException – if there are no integrated GPU

Returns:

status 3D scaling

Return type:

bool

set_scaling_3D(name, value)#

Enable disable GPU 3D scaling. this method send a command like below on your Jetson.

Set 3D scaling on your board, like the command below. To know the GPU name use gpu

with jtop() as jetson:
    if jetson.ok():
        jetson.gpu.set_scaling_3D("ga10b", True)

is equivalent to:

echo 1 > /sys/devices/17000000.ga10b/enable_3d_scaling
Parameters:
  • name (str) – GPU name

  • value (bool) – Enable/Disable 3D scaling

Raises:

JtopException – if GPU doesn’t exist