hipGetLastError/hipPeekAtLastError should really return the last error
produced by any of the runtime calls that did not successfuly complete,
not just the error code of the last runtime call.
For example, in this snippet of code:
1: hipLaunchKernelGGL(MyKernel, dim3(2), dim3(128), 0, 0, 10000,x);
2: hipDeviceSynchronize();
3: hipError_t error = hipGetLastError();
If the call to hipLaunchKernelGGL fails, hipDeviceSynchronize (which
succeeds) should not reset the last error to hipSuccess. hipGetLastError
should still return the non-success error code returned by
hipLaunchKernelGGL.
The last error is reset to hipSuccess after calling hipGetLastError.
Change-Id: Ib7c039067c53c94c99c8ecd83f54212bcef06f81
HIP_RETURN(x) is not a value, it is a statement ending with a return,
this commit replaces all instances of "return HIP_RETURN(x)" with simply
"HIP_RETURN(x)"
Change-Id: I03293b2684a65367ff55e02b3a71ea49ec7a517a
hipModuleGetTexRef() returns success for any global device
variable name even if it's not a texture.
This is wrong thus will fail "hipModuleTexture2dDrv --tests 0x14"
This patch will compare the size to overcome this issue somehow.
Change-Id: I4a4d96f947a68713036437ee525359ff412fefe2
The intention is to make all rocm-packages depend on a tiny rocm-core
package so that all of rocm can be removed by removing
rocm-core. Obviously it is less than ideal that you install by using
some variant of "apt install rocm" and remove everything by "apt
remove rocm-core", but this is easy to document. The alternative "apt
autoremove rocm" may remove unrelated packages.
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>
Change-Id: I95cf65550a33b8852ad3da15bbb5c1ac4a88bf46
Terse static_assert is only available starting with c++17. Add the
message argument since HIP is not compiled using c++17.
Change-Id: I77bc7ddb635e50ac3e6744d73c8751dc8299087e
If the texture object was created from an array, then the array owns
the image SRD. Otherwise, if the texture object is a view, or was
created from a buffer, then it owns the image SRD.
The texture object always owns the sampler SRD.
Change-Id: Id88360c23b2b82418c8c3ae2dd569f427574d420
This reverts commit 5b5f934d58.
Reason for revert: Copyright year to be updated only when a file is getting modified in that year.
Change-Id: Id1ece634dce7e67da9f3f6e10103ef6214e72dab
LINK_LANGUAGE support has some issue in CMake versions from 3.18.0 to
3.19.8 when complex libs' dependence exists. Jump to a known CMake
version 3.20.0 where the issue is fixed.
Change-Id: I3fe6dbc35a7b14baa210df297b7885df83d28178
Replace return value of hipPointerGetAttributes() on NV from
hipErrorUnknown to hipErrorInvalidValue if memory has been freed.
Change-Id: I3fe6dbc35a7a14aa9109df297b7885df83d28149
Make hipModuleGetGlobal match cuModuleGetGlobal behavour.
That is, if one of the first two parameters is nullptr, ignore it.
Change-Id: I3fe6dbc35a7b14aa9119df297b7885df83d28048