Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,047
    • Issues 3,047
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 990
    • Merge requests 990
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Issues
  • #131
Closed
Open
Issue created Sep 18, 2019 by Bugzilla Migration User@bugzilla-migration

Clover does not respect alignment of pointer arguments

Submitted by Matt Arsenault

Assigned to mes..@..op.org

Link to original bug (#93977)

Description

The handling of arguments seems to not account for the required alignment of pointer kernel arguments. The alignment is tracked for the pointer value itself, but nothing is recording the alignment of the pointer element type needed for the runtime to provide the correctly aligned pointer.

I believe this is why the conformance test kernel_memory_alignment_local fails for all of the parameter tests. The global and constant versions seem to work, I'm assuming because every allocated buffer happens to have an alignment of 16 or higher anyway.

Also here: const unsigned arg_store_size = TD.getTypeStoreSize(arg_type);

     // OpenCL 1.2 specification, Ch. 6.1.5: "A built-in data
     // type that is not a power of two bytes in size must be
     // aligned to the next larger power of two".  We need this
     // alignment for three element vectors, which have
     // non-power-of-2 store size.
     const unsigned arg_api_size = util_next_power_of_two(arg_store_size);

TD.getTypeAllocSize(arg_type) should be used instead of manually rounding it.

Version: git

Blocking

  • Bug 99553
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking