Tobias Ringwald

Results 24 comments of Tobias Ringwald

I can also repro the crash. Probably caused here, as the returned object is never `Py_INCREF`'d in https://github.com/pytorch/pytorch/blob/9bd6e93a043d5becba76cb78aeb88a897e80de72/torch/csrc/Dtype.cpp#L85-L92

> @tringwald do you want to submit a fix or should I? I can submit a PR if you want. There also seem to be some other occurrences where the...

If you've already written a test, you can submit the PR. I was just wondering if this here is also a potential problem: https://github.com/pytorch/pytorch/blob/8885638f9509900ca204d12d8c733f318c16a818/torch/csrc/tensor/python_tensor.cpp#L238-L251

This seems to be a `torchmetrics` bug, see discussion on the PyTorch issue tracker (https://github.com/pytorch/pytorch/issues/113973).

Current CI run failures seem to come from `main`.

Maybe we should just replace all `C10_COMPILE_TIME_MAX_GPUS` with the new `C10_MAX_NUM_DEVICES` if we want to keep the device count consistent for all device types.

> > Maybe we should just replace all `C10_COMPILE_TIME_MAX_GPUS` with the new `C10_MAX_NUM_DEVICES` if we want to keep the device count consistent for all device types. > > It's better...

> @tringwald Please add validate() to Device::set_index(DeviceIndex index) as we now rely on the constexpr variable for the valid range of DeviceIndex. Sure, I should probably also add the range...

@albanD Do you want to have another look before merging? Last time this broke caffe2 testing IIRC.