Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fabric and FFCV? #20380

Open
richardrl opened this issue Nov 1, 2024 · 1 comment
Open

Fabric and FFCV? #20380

richardrl opened this issue Nov 1, 2024 · 1 comment
Labels
repro needed The issue is missing a reproducible example

Comments

@richardrl
Copy link

richardrl commented Nov 1, 2024

Description & Motivation

Does Fabric work with FFCV dataloader?
I just tried it and first, when I used fabric.setup(..., ...), it said fabric only works with Pytorch dataloader.

So I removed it. But then, when running my script, I got this:

File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
  return self._call_impl(*args, **kwargs)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
  return forward_call(*args, **kwargs)
File "/data/scratch-oc40/pulkitag/rli14/hamer_diffusion_policy/model/vision/multi_image_obs_encoder.py", line 216, in forward
  feature = self.key_model_map[key](img)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
  return self._call_impl(*args, **kwargs)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
  return forward_call(*args, **kwargs)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torchvision/models/vision_transformer.py", line 291, in forward
  x = self._process_input(x)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torchvision/models/vision_transformer.py", line 277, in _process_input
  x = self.conv_proj(x)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
  return self._call_impl(*args, **kwargs)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
  return forward_call(*args, **kwargs)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 460, in forward
  return self._conv_forward(input, self.weight, self.bias)
File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 456, in _conv_forward
  return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

I also set this: torch.set_float32_matmul_precision('medium') # or 'high'

Pitch

I want Fabric and FFCV to work together well.

Alternatives

No response

Additional context

No response

cc @Borda

@richardrl richardrl added feature Is an improvement or enhancement needs triage Waiting to be triaged by maintainers labels Nov 1, 2024
@lantiga
Copy link
Collaborator

lantiga commented Nov 12, 2024

Can you please post a minimal repro?

@lantiga lantiga added repro needed The issue is missing a reproducible example and removed feature Is an improvement or enhancement needs triage Waiting to be triaged by maintainers labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repro needed The issue is missing a reproducible example
Projects
None yet
Development

No branches or pull requests

2 participants