Skip to content

Feedback about Quickstart #3611

@BhavneetSingh7

Description

@BhavneetSingh7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreTutorials of any level of difficulty related to the core pytorch functionalitymodule: xpuXPU related issuesquestionwindows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions