FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge kernel caching logic for CUDA and OpenCL backends by 9prady9 · Pull Request #2873 · arrayfire/arrayfire · GitHub

Repository navigation

Merge kernel caching logic for CUDA and OpenCL backends - #2873

Merged
9prady9 merged 1 commit into
arrayfire:masterfrom
9prady9:ocl_kernel_cache_improv
May 12, 2020
Merged

9prady9 merged 1 commit into
arrayfire:masterfrom
9prady9:ocl_kernel_cache_improv

Conversation

9prady9 commented May 5, 2020 •
edited
Loading

Copy link
Copy Markdown
Member

Partially addresses tasks from #2857

9prady9 added this to the 3.7.2 milestone May 5, 2020
9prady9 requested a review from umar456 May 5, 2020 18:31
9prady9 marked this pull request as ready for review May 6, 2020 12:58
9prady9 force-pushed the ocl_kernel_cache_improv branch from cfce703 to b95f71c Compare May 11, 2020 06:58

umar456 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks great. Excellent documentation of the new functions. Can't wait to get rid of the old OpenCL kernel lookups.

Comment thread src/backend/common/kernel_util.hpp Outdated
Comment thread src/backend/common/kernel_util.hpp Outdated
Comment thread src/backend/common/kernel_interface.hpp Outdated
Comment thread src/backend/common/kernel_interface.hpp Outdated
* Moved common code required by CUDA and OpenCL caching algorithm into
  kernel_cache.[hpp|cpp]

* Added common/compile_kernel.hpp header that defines the signature
  of the function, compileKernel, that each backend has to implement.

* Each backend has to implement/satisfy the following requirements:

  - Provide compile_kernel.cpp source with compileKernel function that is
    used by common::findKernel

  - Provide Kernel.hpp/cpp that implements KernelInterface from
    common/KernelInterface.hpp

  - Kernel.hpp also provides a functor than helps launch backend kernels.

* Moved kernel utility helpers into separate header(s)/source:

  - TemplateArg.hpp/cpp contains the TemplateArg struct and some helper macros
    to convert template arguments to strings.

  - TemplateTypename.hpp contains the templated TemplateTypename struct that
    helps to convert backend kernel paramters to TemplateArg object.

* Refactored all CUDA kernels to use the new caching API

* Refactored only transpose, morph and canny to use new caching API from OpenCL

* Reduced lot of unnecessary instantiations for morphological functions
9prady9 force-pushed the ocl_kernel_cache_improv branch from b95f71c to dd9d3af Compare May 12, 2020 08:01
9prady9 requested a review from umar456 May 12, 2020 10:26
9prady9 dismissed umar456’s stale review May 12, 2020 10:27

Addressed feedback

9prady9 merged commit 54b7031 into arrayfire:master May 12, 2020
9prady9 deleted the ocl_kernel_cache_improv branch May 12, 2020 17:21
umar456 mentioned this pull request Jun 27, 2020
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL