Skip to content

Commit

Permalink
fixed some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rickybalin committed Oct 31, 2024
1 parent af0abdd commit a174961
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/aurora/data-science/frameworks/libtorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ make
Similarly to PyTorch, LibTorch provides API to perform instrospection on the devices available on the system.
The simple code below shows how to check if XPU devices are available, how many are present, and how to loop through them to discover some properties.

```bash
```c++
#include <torch/torch.h>
#include <c10/xpu/XPUFunctions.h>

Expand Down Expand Up @@ -105,7 +105,7 @@ int main(int argc, const char* argv[])
This example shows how to perform inference with the ResNet50 model using LibTorch.
First, get a jit-traced version of the model executing `python resnet50_trace.py` (shown below) on a compute node.
```bash
```python
import torch
import torchvision
import intel_extension_for_pytorch as ipex
Expand All @@ -129,7 +129,7 @@ torch.jit.save(model_jit, f"resnet50_jit.pt")
```

Then, build `inference-example.cpp` (shown below)
```bash
```c++
#include <torch/torch.h>
#include <torch/script.h>

Expand Down Expand Up @@ -174,7 +174,7 @@ The LibTorch API can be integrated with data pilelines using SYCL to operate on
The code below extends the above example of performing inference with the ResNet50 model by first generating the input data on the CPU, then offloading it to the GPU with SYCL, and finally passing the device pointer to LibTorch for inference using `torch::from_blob()`, which create a Torch tensor from a data pointer with zero-copy.
The source code for `inference-example.cpp` is modified as follows
```bash
```c++
#include <torch/torch.h>
#include <torch/script.h>
#include <iostream>
Expand Down
8 changes: 4 additions & 4 deletions docs/polaris/data-science-workflows/frameworks/libtorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module use /soft/modulefiles
module load conda/2024-04-29
conda activate
```
which will also load, `PrgEnv-gnu/8.5.0` and `cmake`.
which will also loads `PrgEnv-gnu/8.5.0` and `cmake`.


## Torch Libraries
Expand Down Expand Up @@ -58,7 +58,7 @@ make
Similarly to PyTorch, LibTorch provides API to perform instrospection on the devices available on the system.
The simple code below shows how to check if CUDA devices are available, how many are present, and how to loop through them to discover some properties.

```bash
```c++
#include <torch/torch.h>

int main(int argc, const char* argv[])
Expand All @@ -85,7 +85,7 @@ int main(int argc, const char* argv[])
This example shows how to perform inference with the ResNet50 model using LibTorch.
First, get a jit-traced version of the model executing `python resnet50_trace.py` (shown below) on a compute node.
```bash
```python
import torch
import torchvision
from time import perf_counter
Expand All @@ -108,7 +108,7 @@ torch.jit.save(model_jit, f"resnet50_jit.pt")
```

Then, build `inference-example.cpp` (shown below)
```bash
```c++
#include <torch/torch.h>
#include <torch/script.h>

Expand Down

0 comments on commit a174961

Please sign in to comment.