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

请教CUPY/CUDA #51

Open
2020zyc opened this issue May 21, 2022 · 1 comment
Open

请教CUPY/CUDA #51

2020zyc opened this issue May 21, 2022 · 1 comment

Comments

@2020zyc
Copy link

2020zyc commented May 21, 2022

  1. 您好,如图所述,我想查看 cupy操作cuda的函数的具体定义和用法,但是可能是因为cupy封装了c/c++代码,所以看不到,请问可以去哪里看呢?
    能帮忙解释一下图中第3个参数 routine 里面 4个函数执行顺序吗(我了解大概是 创建结构体、计算对称量化的scale)

image

跳到定义处,就只有这样的doc
image


  1. 请问下图红框内为什么那样写?

image


3. 想问一下为什么选择使用cupy直接操作cuda呢,比如allocator、igemm、fgemm的应用?这样相比使用框架(如pytorch等)实现量化有更大的好处吗?感觉cupy+cuda实现方式 要求挺高的

非常感谢

@a710128

@a710128
Copy link
Collaborator

a710128 commented Jun 27, 2022

  1. 主要还是pytorch没法用自己编写的allocator,所以为了更好的在低资源环境下跑起来,使用了cupy进行手动管理。
  2. cupy的 reduce routine 分别是 pre-reduce mapping, reduce, post-reduce mapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants