Git Product home page Git Product logo

Comments (2)

dkhaldi avatar dkhaldi commented on June 12, 2024

The reason to use size_t for "joint_matrix" shape rows and cols and things like: stride and coordinates in the joint_matrix_apply, is to be consistent with what is currently using in SYCL spec (sycl::marray, sub_group_sizes) and C++ (a span extent type is "size_t").

How these are handled in SPIRV?
Adding @gmlueck to get his opinion on this.

from llvm.

gmlueck avatar gmlueck commented on June 12, 2024

Rows/Cols are explicitly set to be constant instruction with scalar 32-bit integer type, so right now if we want to ensure conformance of our implementation we need to check for 32-bit overflow and then cast size_t to uint32_t for these parameters.

Are we just talking about some extra validation in the LLVM-to-SPIRV translator? If so, this doesn't sound too onerous.

If using size_t was causing a performance slowdown, I would be more swayed. In that case, I'd suggest using int or unsigned as the type, though, rather than uint32_t. Using uint32_t just because that is the representation in SPIR-V seems like we would be leaking implementation details into the API.

from llvm.

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.