Coder Social home page Coder Social logo

Comments (7)

veselypeta avatar veselypeta commented on July 30, 2024

Turns out this is already added to the spec, but does not appear in the generated header since it's not supported by level-zero
https://github.com/oneapi-src/unified-runtime/blob/main/scripts/core/enqueue.yml#L675

from unified-runtime.

kbenzie avatar kbenzie commented on July 30, 2024

We should discuss why there are disabled entry points with the WG.

from unified-runtime.

kbenzie avatar kbenzie commented on July 30, 2024

Along with urEnqueueMemImageFill, urEnqueueMemImageMap is also currently disabled.

from unified-runtime.

veselypeta avatar veselypeta commented on July 30, 2024
  • piEnqueueMemImageFill is only implemented in the OpenCL plugin
  • piEnqueueMemImageMap does not exist it PI.

I suppose we do not need to add these entry-points

from unified-runtime.

kbenzie avatar kbenzie commented on July 30, 2024

If these are necessary to implement SYCL 2020, they should be added to the UR spec.

from unified-runtime.

kbenzie avatar kbenzie commented on July 30, 2024

Based on discussion with @AerialMantis it does not appear that these commands are required for SYCL 2020 because it is only possible to read() and write() images via the unsampled and sampled image accessors.

Resolution of this issue, should be to remove the currently disabled urMemImageFill entry point from the yaml file.

from unified-runtime.

aarongreig avatar aarongreig commented on July 30, 2024

These entry points are still in the spec files. I would have already opened the PR to get them deleted but strangely MemImageFill does appear to get used in the sycl runtime: https://github.com/intel/llvm/blob/sycl/sycl/source/detail/memory_manager.cpp#L851 and not just in a sort of stubbed out helper function or whatever.

I think what's happening here is that SYCL has this fill function that takes an accessor, which is a potentially multi-dimensional array view type object that sits on top of an allocation. You can see there's a little bit of extra code where I linked in the "not image" branch that deals with it possibly being a > 1D operation for buffers. It looks like in the "yes image" branch they're taking advantage of the fact that there's this magic API for images that deals with that nonsense for them, it seems more like a use out of convenience than out of necessity.

Technically I think we could implement ImageFill for all the adapters that support images, but for everything that isn't opencl it would basically be a regular fill with the additional faff of keeping track of which mem_obj belongs to which image and figuring out what our pixel size and strides etc are. All that seems kind of pointless when that one use that I linked has that info on hand and leaves it out when it calls the ImageFill entry point instead of the BufferFill one.

Anyway we should probably bring this up to sycl maintainer people because if we delete ImageFill now we should also figure out how we can delete it from PI and memory_manager so it doesn't come back to bite us later when it's time to port.

from unified-runtime.

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.