GithubHelp home page GithubHelp logo

Comments (5)

cjatin avatar cjatin commented on June 28, 2024

which mad instruction(GCN ISA/fma)? what are you trying to run? Can you provide a sample? What behavior were you expecting?

from clr.

qiji2023 avatar qiji2023 commented on June 28, 2024

@cjatin
on RDNA
v_mad_u64_u32, why doesn't it carry in?
for example:
a1, c1(carry out) = b1 + d1 +c0(carry in)
a2, c2(carry out) = b2 + d2 + c1(carry in)

from clr.

cjatin avatar cjatin commented on June 28, 2024

not a hip issue

from clr.

yxsamliu avatar yxsamliu commented on June 28, 2024

this issue is better raised against amdgpu backend on llvm-project github https://github.com/llvm/llvm-project/issues in the hope that the hardware limitation may be reported to right channel.

Based on ISA manual

https://www.amd.com/content/dam/amd/en/documents/radeon-tech-docs/instruction-set-architectures/rdna3-shader-instruction-set-architecture-feb-2023_0.pdf

the instruction does not have carry in. this may be a design decision due to cost/performance balance. since support carry in with mad will increase its footage on chip design, but you can still use add/multiply to handle need for carry in.

how much performance gain can be achieved if there is carry in in mad instruction?

from clr.

qiji2023 avatar qiji2023 commented on June 28, 2024

this issue is better raised against amdgpu backend on llvm-project github https://github.com/llvm/llvm-project/issues in the hope that the hardware limitation may be reported to right channel.

Based on ISA manual

https://www.amd.com/content/dam/amd/en/documents/radeon-tech-docs/instruction-set-architectures/rdna3-shader-instruction-set-architecture-feb-2023_0.pdf

the instruction does not have carry in. this may be a design decision due to cost/performance balance. since support carry in with mad will increase its footage on chip design, but you can still use add/multiply to handle need for carry in.

how much performance gain can be achieved if there is carry in in mad instruction?

For big integer multiply.
If I use the current instruction, I need mad -> add -> mad -> ... it is 6 clk for single operation
but if mad instruction have carry in, I only need mad->mad -> ... it is only 4 clk for single operation

I can gain at least 50% performance improvement.

from clr.

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.