Giter VIP home page Giter VIP logo

Comments (5)

Yuxin-CV avatar Yuxin-CV commented on June 1, 2024

Hi @coni-coco, we build xformer from source using commit https://github.com/facebookresearch/xformers/tree/7e05e2caaaf8060c1c6baadc2b04db02d5458a94

But we believe using the latest version of pytorch & xformer also works.

from eva.

Dinosaurcubs avatar Dinosaurcubs commented on June 1, 2024

@Yuxin-CV
File "/usr/src/EVA-master/EVA-02/det/detectron2/modeling/backbone/vit.py", line 275, in forward
x = self.attn(x)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/src/EVA-master/EVA-02/det/detectron2/modeling/backbone/vit.py", line 125, in forward
x = xops.memory_efficient_attention(q, k, v)
File "/usr/local/lib/python3.8/dist-packages/xformers/ops/memory_efficient_attention.py", line 967, in memory_efficient_attention
return op.forward_no_grad(
File "/usr/local/lib/python3.8/dist-packages/xformers/ops/memory_efficient_attention.py", line 343, in forward_no_grad
return cls.FORWARD_OPERATOR(
File "/usr/local/lib/python3.8/dist-packages/torch/_ops.py", line 143, in call
return self._op(*args, **kwargs or {})
RuntimeError: CUDA error: invalid device function
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

你好 请问你们用的xformer具体版本号是多少 我这边换了好几个xformer,在检测任务上训练没问题 但测试时出现以上error,感觉是这个xformer包的版本问题 谢谢

from eva.

ShuxunoO avatar ShuxunoO commented on June 1, 2024

TypeError Traceback (most recent call last)
Cell In[2], line 7
4 text = tokenizer(["a diagram", "a dog", "a cat"]).to(device)
6 with torch.no_grad(), torch.cuda.amp.autocast():
----> 7 image_features = model.encode_image(image)
8 text_features = model.encode_text(text)
9 image_features /= image_features.norm(dim=-1, keepdim=True)

File /data/sswang/NFT_search/EVA/EVA-CLIP/utils/../rei/eva_clip/model.py:302, in CustomCLIP.encode_image(self, image, normalize)
301 def encode_image(self, image, normalize: bool = False):
--> 302 features = self.visual(image)
303 return F.normalize(features, dim=-1) if normalize else features

File ~/anaconda3/envs/rei/lib/python3.8/site-packages/torch/nn/modules/module.py:1130, in Module._call_impl(self, *input, **kwargs)
1126 # If we don't have any hooks, we want to skip the rest of the logic in
1127 # this function, and just call forward.
1128 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1129 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1130 return forward_call(*input, **kwargs)
1131 # Do not call functions when jit is used
1132 full_backward_hooks, non_full_backward_hooks = [], []

File /data/sswang/NFT_search/EVA/EVA-CLIP/utils/../rei/eva_clip/eva_vit_model.py:529, in EVAVisionTransformer.forward(self, x, return_all_features)
527 if return_all_features:
...
212 )
213 x = x.reshape(B, N, -1)
214 x = self.inner_attn_ln(x)

TypeError: memory_efficient_attention() got an unexpected keyword argument 'scale'

在执行安装依赖
pip install -r requirements.txt
Xformers从0.0.18一直安装到0.0.13 执行官方给的demo时报错,不知道是不是Xformer的版本问题

from eva.

ShuxunoO avatar ShuxunoO commented on June 1, 2024

Hi @coni-coco, we build xformer from source using commit https://github.com/facebookresearch/xformers/tree/7e05e2caaaf8060c1c6baadc2b04db02d5458a94

But we believe using the latest version of pytorch & xformer also works.

I upgrade my dependencies as following:

torch 2.0.1
torchvision 0.15.2
xformers 0.0.20
nvidia-cudnn-cu11 8.5.0.96
……

It works!

from eva.

seabearlmx avatar seabearlmx commented on June 1, 2024

Hi @ShuxunoO, when you follow these versions:

torch 2.0.1
torchvision 0.15.2
xformers 0.0.20
nvidia-cudnn-cu11 8.5.0.96

the mmcv and mmsegmentation version is?

from eva.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.