pytorch / pytorch/tutorials

Feedback about Quickstart

Open
#3,611 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core module: xpu question windows
Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html#optimizing-the-model-parameters

System specs: Windows 11, python3.11, pytorch==2.8.0+xpu, Intel oneAPI 2025.2.

Been following this tut, I got this error raising from test function

correct += (pred.argmax(1) == y).type(torch.float).sum().item()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: UR error

Checked all the compatibility of oneAPI, pytorch, and intel_extension_for_pytorch

print(torch.xpu._is_compiled())
print(torch.xpu.is_available())

Both prints True

Really new to ML and NN, but not dev, so tried using torch.FloatTensor
correct += (pred.argmax(1) == y).type(torch.FloatTensor).sum().item()
It works and output almost matches to what's given in tut.

I hope what I did is correct in terms of ML.
If not please suggest where can I lookup to understand this better.

cc @albanD @jbschlosser @gujinghui @EikanWang @fengyuan14 @guangyey

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Optimizing the Model Parameters section of the Quickstart page and reproduce the reported error in the stated Windows, Python, PyTorch XPU, and Intel oneAPI environment. Compare the tutorial's type conversion with the reported FloatTensor workaround, then document whether the tutorial needs a correction and what users should expect when the test function completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.