Running Workloads on Bare Metal

Before you start, make sure to follow the instructions in the Installation Guide and On-Premise System Update.

Download PyTorch Model References

  1. Clone the Model References repository on your Gaudi device:

    git clone https://github.com/HabanaAI/Model-References.git
    
  2. Move to the subdirectory containing the hello_world example which presents a basic PyTorch code example:

    cd Model-References/PyTorch/examples/computer_vision/hello_world/
    
  3. Update PYTHONPATH to include Model References repository and set PYTHON to Python executable:

    export GC_KERNEL_PATH=/usr/lib/habanalabs/libtpc_kernels.so
    export PYTHONPATH=$PYTHONPATH:Model-References
    export PYTHON=/usr/bin/python3.10
    

    Note

    The Python version depends on the operating system. Refer to the Support Matrix for a full list of supported operating systems and Python versions.

  4. Run training on 1 HPU in Lazy mode using the following command:

$PYTHON example.py

Training Examples

Next Steps

For next steps you can refer to the following:

  • To explore more models from the Model References, start here.

  • To run more examples using Hugging Face go here.

  • To migrate other models to Gaudi, refer to PyTorch Model Porting.