Conversation
Codecov Report
@@ Coverage Diff @@
## develop #681 +/- ##
===========================================
+ Coverage 52.40% 52.42% +0.01%
===========================================
Files 298 298
Lines 46059 46059
===========================================
+ Hits 24139 24148 +9
+ Misses 21920 21911 -9
Continue to review full report at Codecov.
|
|
@atamazov Can I bother you to take a look at this PR |
| "Which of MIOpens's backends to use?" ) | ||
| set_property( CACHE MIOPEN_BACKEND PROPERTY STRINGS | ||
| OpenCL HIP HIPOC ) | ||
| OpenCL HIP HIPOC NOGPU) |
There was a problem hiding this comment.
So maybe this should be name HIPNOGPU since it still requires hip runtime but no gpu.
| const Allocator::ManageDataPtr& /* ddata */, | ||
| std::size_t /* sz */) const | ||
| { | ||
| MIOPEN_HANDLE_LOCK |
There was a problem hiding this comment.
This handle lock is actually for the GPU, so I dont think its needed here.
| std::size_t /* sz */) const | ||
| { | ||
| MIOPEN_HANDLE_LOCK | ||
| this->Finish(); |
There was a problem hiding this comment.
Since Finish does nothing, this function call could be removed.
|
We should probably add some tests for this on jenkins so we can make sure someone doesn't accidentally break this in another PR. I guess at first, we could just add jenkins job that just builds this. |
atamazov
left a comment
There was a problem hiding this comment.
Please merge latest develop here. I am afraid that some of the latest changes (TargetID related) might break functional compatibility of this PR with develop.
This PR looks like a continuation of #307. Two related questions:
| if( MIOPEN_BACKEND STREQUAL "NOGPU") | ||
| list(APPEND MIOpen_Source | ||
| hip/hiperrors.cpp | ||
| nogpu/handle.cpp |
There was a problem hiding this comment.
[Notice] AFAICS this PR does not use a mechanism designed to add new backends -- I mean the HandleImpl machinery, -- in the originally intended way. So I am curious, why.
However, I do not have time to consider this issue in detail. If it doesn't break anything, and it works for you, then okay. For now ;)
There was a problem hiding this comment.
The PR does introduce a new implementation here which has been moved out of the cpp file so that the client program can include the header file and override the behavior when desired.
DeepCode's analysis on #70cc1f found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot |
JehandadKhan
left a comment
There was a problem hiding this comment.
We should probably add some tests for this on jenkins so we can make sure someone doesn't accidentally break this in another PR. I guess at first, we could just add jenkins job that just builds this.
Updated the Jenkinsfile
Updated the branch with latest changes from develop.
@atamazov I concur with your observation, there certainly is considerable overlap. In retrospect we should have implemented this PR from the get go and avoided littering the library with numerous env vars and conditionals to check for them. However, recently it became clear to me that we need a more thorough approach to the issue of Tuna ( + fin) trying to override various MIOpen behaviors which is not achievable using env vars. For example an API centric way to override the device name / cu count and in the future, behavior around the program/kernel cache. After discussing with @pfultz2 I decided to implement the first necessary step (this PR) which may be expanded upon later (for binary cache etc).
I am not sure, perhaps its best to ask the author on the same issue ie #560
That is correct, we can revert those changes as soon as the corresponding changes ( using the proposed PR) are implemented in Tuna. In that case the leftovers in #560 would be irrelevant and we can close them. |
|
@JehandadKhan Thanks for feedback. |
|
@daniellowell The CI passes |
| new_cnt = cur.execute("SELECT count(*) from perf_db").fetchone()[0] | ||
| assert(new_cnt == total_cnt) | ||
| new_slv_cnt = {} | ||
| for cnt, slv in cur.execute("select count(*), solver from perf_db group by solver;"): |
There was a problem hiding this comment.
@JehandadKhan should there be a cur.close() somewhere here?
|
|
||
| std::size_t Handle::GetImage3dMaxWidth() const { return this->impl->img3d_max_width; } | ||
|
|
||
| std::size_t Handle::GetWavefrontWidth() const { return this->impl->warp_size; } |
There was a problem hiding this comment.
IIRC the NOGPU backend is used for building kernels. GetWavefrontWidth() should return correct value (in accordance to the target GPU type) in order to Solvers generate proper Solutions. Build options may depend on wavesize. This would lead to cache misses when using a cache filled by kernels built with NOGPU.
The PR adds another backend to MIOpen to support operations that do not require a GPU. This is accomplished by modifying the HIP backend so that the HIP API calls corresponding to those operations are not issued.
Additionally, this PR enables the access to the handle implementation outside MIOpen so that the client application can override Handle behaviors around device properties.
This backend can be used to enable functionality that only depends on the host side code and primarily intended to support testing and Tuna related operation around collection of data and library introspection purposes.