Skip to content

Conversation

@nkaretnikov
Copy link
Collaborator

@nkaretnikov nkaretnikov commented Jun 5, 2023

@pytorch-bot
Copy link

pytorch-bot bot commented Jun 5, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/102944

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit d266966:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

if not allow_low_precision_dtypes:
torch._check(
dtype in (torch.float, torch.double, torch.cfloat, torch.cdouble),
lambda: f"{f_name}: Low precision dtypes not supported. Got {dtype}",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CPP code:

static inline void checkFloatingOrComplex(const Tensor& t, const char* const f_name, const bool allow_low_precision_dtypes=true) {
  auto dtype = t.scalar_type();
  TORCH_CHECK((at::isFloatingType(dtype) || at::isComplexType(dtype)),
              f_name, ": Expected a floating point or complex tensor as input. Got ", dtype);
  if (!allow_low_precision_dtypes) {  // <--------- here
    TORCH_CHECK(dtype == kFloat || dtype == kDouble || dtype == kComplexFloat || dtype == kComplexDouble,
                f_name, ": Low precision dtypes not supported. Got ", dtype);
  }
}

Copy link
Collaborator

@lezcano lezcano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to move forward, but can you add an error sample to one of the linalg ops to make sure we're testing this?

@nkaretnikov
Copy link
Collaborator Author

nkaretnikov commented Jun 8, 2023

Note: waiting until #103240 lands (again) before I rebase this and merge.

UPD: Decided to land this first if possible. Looks like the PR I'm referencing here is not reviewed and has some failures.

@facebook-github-bot facebook-github-bot deleted the gh/nkaretnikov/133/head branch June 13, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants