Commit Graph

62 Commits

Author SHA1 Message Date
Marko Arandjelovic a261d1f49c Revert "SWDEV-441296 - Allign hipTexObjectCreate error handling to CUDA"
This reverts commit 2e7581a69a.

Changing the error code is considered as a breaking change,
so it should be done in major releases only.

The other reason for reverting the commit is that this change itself
is incorrect. Cuda behaves in the same way as hip when
pResDesc or pTexDesc are nullptr.

Change-Id: I3abee6b79279b81ab01c7f8466c7f8e3776c4109


[ROCm/clr commit: cfdc9dfc36]
2024-09-18 16:38:16 -04:00
Marko Arandjelovic 9fab61ebe3 SWDEV-478206 - Fix hipTexRefSetArray
Change-Id: I6bd6ce60163d4f79001fce75e40ef46f1fcb7c3f


[ROCm/clr commit: 224334e1d2]
2024-09-04 03:41:25 -04:00
Marko Arandjelovic 382f435359 SWDEV-478520 - Prevent segfaults in hipTexRefSetAddress
Change-Id: I9a57ccb81c574e35e7ebf6d71512f9249413bc3e


[ROCm/clr commit: ddc5744c19]
2024-08-29 05:05:37 -04:00
Vladana Stojiljkovic e8b3e9e5b6 SWDEV-478207 - Return hipSuccess on the end of hipTexRefGetMaxAnisotropy
Change-Id: I0c4d6d13a178af8449853c87e62a1868eb17f87d


[ROCm/clr commit: f5e6e27fe1]
2024-08-27 05:30:36 -04:00
Vladana Stojiljkovic 6fcb2c655f SWDEV-475127 - Check if hipBindTextureToArray parameters are null before dereferencing them
Change-Id: Id0173faff0a385d1665194c9033083ef9b2c48b5


[ROCm/clr commit: d7b07b94a0]
2024-08-01 05:01:55 -04:00
Marko Arandjelovic 92ddb8e242 SWDEV-475114 - Prevent segfaults in hipBindTexture
Change-Id: I050f36a5c74a5d4542155040ccce043fee6b73ad


[ROCm/clr commit: b3153a5f41]
2024-07-31 16:57:57 -04:00
Marko Arandjelovic 2e7581a69a SWDEV-441296 - Allign hipTexObjectCreate error handling to CUDA
Change-Id: I9ff01c22f14344e0e82e473104d6930e9fa5ff77


[ROCm/clr commit: 7d3c0c5e10]
2024-07-15 15:51:41 -04:00
taosang2 83eb6e766d SWDEV-465162 - Fix some issue with image support
Fix some small issues regarding image and mipmap support

Change-Id: I8e64223d44f37c2dbb115cbb343441a48021ba7b


[ROCm/clr commit: 1566ff7639]
2024-06-18 16:38:24 -04:00
Marko Arandjelovic 8b557c7318 SWDEV-441296 - Fixes related to hipTexObjectCreate unit test
- Avoid potential division by zero
 - Nullptr check

Change-Id: Ic857eb4fe968173c852eb7a67934e33fc74c055f


[ROCm/clr commit: d12af175af]
2024-06-14 03:58:34 -04:00
shadi f318f0f7e6 SWDEV-388256 - correct API name
Signed-off-by: shadi <shadi.dashmiz@amd.com>
Change-Id: Icbf79613268fe0737a8033abfbcc9f33d785bc12


[ROCm/clr commit: a071c4d2fc]
2024-01-03 15:06:41 -05:00
taosang2 75b68c4989 SWDEV-435296 - Fix sporatic segment fault
Fix sporatic segment fault in texture test
via retaining image in texture object which
references the image.
The image will be released when the texture
object is destroyed.

Change-Id: Ic3fefa2d5dda6afebd1acd4d41ad310b138af6dd


[ROCm/clr commit: d6d235a111]
2023-12-15 21:06:20 -05:00
Saleel Kudchadker f969d89aa4 SWDEV-301667 - Logging refactor
- Remove newline from logging as log function internally inserts a new
line

Change-Id: I25eb2242a1f1e87cf811bcc373d1d485b2e027a8


[ROCm/clr commit: 058b2702db]
2023-12-07 12:12:57 -05:00
Anusha GodavarthySurya 3bdedf0cc7 SWDEV-351966 - Dispatch table for hip runtime
Change-Id: Ie4a44fa8cf1ff9c152146070bbbf6b0636d4e325


[ROCm/clr commit: 5e21f0c6bd]
2023-11-22 01:11:19 -05:00
Jaydeep Patel 86902b4d96 SWDEV-425248 - numerous bug fixes.
Set flag with hipCtxCreate so that get flags works.
Validate hipHostGetDevicePointer for flags!=0.
Validate mem cpy kind and accommodate new type hipMemcpyDeviceToDeviceNoCU.
Match error code for hipGetChannelDesc.

Change-Id: If09a635ac01bc53f1fe2b7df3f3f9c1b0d69a0ab


[ROCm/clr commit: 8e8fb993de]
2023-11-07 22:49:20 -05:00
taosang2 c9b9210059 SWDEV-299127 - Support External Mipmap
Support hipExternalMemoryGetMappedMipmappedArray().
Add ImageExternalBuffer to differiate ImageBuffer.
Currently we only support tiling_optimal mode as
vulkan driver doesn't provide tiling information.

Change-Id: I7e3524cdde53e4df9f728894bcebf4bd3f58d4d9


[ROCm/clr commit: 6398f604b0]
2023-10-05 09:58:17 -04:00
taosang2 9aa3a87b66 SWDEV-368553 – Add missing mipmap Apis
Add missing mipmap Apis’ implementation.
Fix some bugs of mimpmap apis.
Use hipmipmappedArray to differentiate cuda
and driver apis on Nvidia.
Change-Id: I6079d9f3b2ddf4e42b9a6f7f3902322cfca02cfd


[ROCm/clr commit: f03c11491b]
2023-06-22 17:24:21 -04:00
Jaydeep Patel 37769589f3 SWDEV-383056 - Don't sync with dst device for hipMemcpyAsync.
Change-Id: I28530e6bd870d617507592576295fc9e7eed1475


[ROCm/clr commit: 57fa5938fe]
2023-02-28 23:21:01 -05:00
Ioannis Assiouras 2633e62801 SWDEV-381402 - Derive hip::Stream from amd::HostQueue
Change-Id: I6c1aca5eb350c32d974ae4ffcc725705355956d8


[ROCm/clr commit: e3633dc8f4]
2023-02-21 18:12:03 -05:00
Ajay ca2235f671 SWDEV-353548 - assert with different behavior for Release vs Debug
assert statement behavior
-Debug: crashes tests with SIGABORT
-Release: continues silently without

Change-Id: I7578eb16a7391ff7f9d68f1cae3bcea7f8225579


[ROCm/clr commit: be80bf5406]
2022-10-11 14:00:28 -04:00
Jiabao Xie 2f90d3e296 SWDEV-351055 - changed isParent() to checking directly for parent's pointer. image should not be released for test types in Unit_hipMallocArray_happy
Change-Id: I8e4fae8c9188ee68c392237cb824a790ad7c9563


[ROCm/clr commit: d9f002c36f]
2022-08-25 10:11:54 -04:00
Tao Sang c5f60e51ac SWDEV-327502 Disable 3D linear filter on Mi200
Change-Id: I3f79fb4f3a59cd7335c5ca2363cf1659a0a7f6aa


[ROCm/clr commit: 2a91d45704]
2022-07-08 11:31:57 -04:00
Ajay caa9b581b5 SWDEV-340506 - Unit_hipCreateTextureObject_Pitch2DResource fix
Change-Id: I85431036818a3eb24100b1660e806a1c80d847eb


[ROCm/clr commit: 01ea934b3e]
2022-07-07 13:05:08 -04:00
Rakesh Roy 2fcf335ee1 SWDEV-342007 - Fix hipArray Allocation APIs
- Capture error status of ihipImageCreate
- Return hipErrorOutOfMemory when image creation fails

Change-Id: If127a515447cc362d55fccd3eae304271da252d5


[ROCm/clr commit: 62069a5ae8]
2022-06-30 00:28:47 -04:00
Tao Sang 79d6018cd7 SWDEV-319818 - Revert change on hipResourceViewDesc
Revert part of
http://gerrit-git.amd.com/c/compute/ec/hipamd/+/675588

Change-Id: Iee9dac9f8c50aa9b6a12ca9d8fd792a51973b8cd


[ROCm/clr commit: 4561a207dd]
2022-05-12 12:14:13 -04:00
Tao Sang 1a9a5f9bfc SWDEV-319818 - Release restriction on hipResourceViewDesc
Let more types support hipResourceViewDesc.
Add missing symbols to fix cuda build failing.

Change-Id: Ife694cc6491427093863252e257e820b0bb4fa0f


[ROCm/clr commit: a19b767e8a]
2022-05-10 15:57:31 -04:00
Saleel Kudchadker 8139cc4683 SWDEV-301667 - Fix build warnings
Change-Id: Ice23b3d1a19a7958ca5c3caff34db2934b361a98


[ROCm/clr commit: 086aee0fcb]
2022-03-02 20:49:18 -05:00
haoyuan2 cb3f8b4f97 SWDEV-319128 - workaround explicit loading functional issue in Blender
Change-Id: I9d56293b5e2e72874b1160fce62ee68365741d5c


[ROCm/clr commit: fb07b4e097]
2022-01-25 22:45:24 -05:00
Tao Sang 68c75c9fb7 SWDEV-303204 - Disable texture/image Apis on some devices
If the target device doesn't support image,
compiler will send out unavailable error if device texture apis
are called; and host texture apis will return hipErrorNotSupported.
Remove useless include/hip/amd_detail/texture_functions.h.
Add hipDeviceAttributeImageSupport attribute to check image
support in runtime.
Add __HIP_NO_IMAGE_SUPPORT(=1) macro in device code to indicate
texture apis not supported.
Change-Id: Ia891493e681a61980a2444859a90e046a9ebea39


[ROCm/clr commit: 5acc8b5102]
2021-12-04 08:14:08 -05:00
kjayapra-amd e9238ae2f1 SWDEV-298434 - Delete texture references resources before deleting the ptr.
Change-Id: Ib616aadd45eced1b10891c908e986bbeddc08288


[ROCm/clr commit: 7145c500b3]
2021-11-12 11:20:47 -05:00
Tao Sang f970a1be0f SWDEV-306947 Enable hipAddressModeBorder
Enable hipAddressModeBorder.
Fix default of height of hipMallocArray().
Some code improvement.

Change-Id: I57045118e7adf915074c547cbe76349a4cfd72d8


[ROCm/clr commit: 17cc99c05d]
2021-10-27 10:05:53 -04:00
Vladislav Sytchenko 0bda91b6ba SWDEV-297808 - Correct sampler destruction logic
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


[ROCm/clr commit: 88f6f3d581]
2021-08-10 11:37:49 -04:00
Vladislav Sytchenko 8dc0bb325a SWDEV-297808 - Free sampler when destroying textures
Change-Id: Idaab76392d18c7f5fedc89497e93f0d17835001a


[ROCm/clr commit: b41d5d73d4]
2021-08-09 21:49:36 -04:00
Julia Jiang 6883ccde42 SWDEV-286322 - Remove execution permission
Change-Id: I96e603fc8d407c3a76fa1053bad81e45744b59ad


[ROCm/clr commit: 8835b897d5]
2021-08-05 14:04:06 -04:00
Rahul Garg 62a018191f SWDEV-297563 - Move declarations to hip
Change-Id: Ifdab79945ea2e625e8cef5cd71d638552e9a740b


[ROCm/clr commit: 3dd9dbb359]
2021-08-02 11:56:08 -04:00
agunashe fae697b4d6 SWDEV-293742 - Update copyrights end year for hipamd
Change-Id: I08f620f84563a9214b59f1b943ed091b67229eab


[ROCm/clr commit: d9d9e81acb]
2021-07-09 12:08:39 -04:00
Rahul Garg dd95d3d23c ROCMOPS-1956 - Push restructured code to hipamd
hipamd will have AMD's ROCCLR based HIP backend implementation

Change-Id: Id7de9634519b4ce46fca71a1b61f3d5b1e3fc459


[ROCm/clr commit: 19c84bc604]
2021-06-07 21:42:44 +00:00
Tao Sang 6227f3fae2 Remove hip-hcc codes: Part one
Remove hip-hcc codes from hip code base
Simplify hip CMakeLists.txt to exclude hip-hcc
Simplify cmake cmd for hip-rocclr building
Some minor fixes

Change-Id: I1ae357ecfd638d6c25bca293c1724b026be21ecd


[ROCm/clr commit: 1cba7ec965]
2020-12-09 15:49:47 -05:00
Maneesh Gupta e5ee180568 Merge branch 'amd-master' into amd-master-next
Change-Id: I3094c15008093f2072bcd38aca4ea90aeae2d97b


[ROCm/clr commit: 0ea6697192]
2020-04-09 06:31:00 -04:00
vsytch e2b6794a07 Device texture functions should not normalize the sampled pixel (#1826)
* Device texture functions should not normalize the sampled pixel. This is already done by HW.
* Add support to use h/w capability for normalized float data convertion for driver API's

Co-authored-by: ansurya <50609411+ansurya@users.noreply.github.com>


[ROCm/clr commit: fa363ae721]
2020-02-05 20:56:17 +05:30
ansurya 7f788181ec Fix texture tests, always pass row pitch to HSA API for linear layout images (#1785)
=> New ROCr calculates pitch as per HSA specification and addrlib is used to check whether HW can support that configuration. Hence few texture tests are failing with HSA_EXT_STATUS_ERROR_IMAGE_PITCH_UNSUPPORTED.

=> Determine pitch for linear images and always pass rowpitch to HSA API's.

[ROCm/clr commit: 688b6e6af0]
2020-01-16 08:54:30 +05:30
ansurya f5a92e5cb6 Fixed texture 2D mapping for pitched arrays & 3D Texture read (#1415)
Texture 2D image mapping for pitched arrays:
github issue: Texture Object's Buffer seems to be Misaligned #886
JIRA ticket: SWDEV-199313

SWDEV-151670 : Fixed issue with 3D texture with 4 components
SWDEV-151671 : Issue with 2D layered texture with 4 components

[ROCm/clr commit: dc8f556460]
2019-11-07 13:17:46 +05:30
Anusha Godavarthy Surya c5fc879606 Fix undefine ref to hipUbindTexture for texture types
[ROCm/clr commit: a5d9f56bef]
2019-10-09 16:26:06 +05:30
Rahul Garg 8d500c1b59 Add texref get APIs support (#1471)
Added support for -
    hipTexRefGetArray
    hipTexRefGetAddressMode
    hipTexRefGetAddress



[ROCm/clr commit: d5a61736d8]
2019-10-04 13:38:45 +05:30
Jeff Daily 68f674205e consolidate thread local storage (#915)
* all thread local access now through single struct

* clean up old commented-out code, more use of GET_TLS()

* fewer calls to GET_TLS by passing tls as a funtion argument

* revert unnecessary change to printf

* fix failing tests due to TLS change

* fix merge conflicts in ihipOccupancyMaxActiveBlocksPerMultiprocessor


[ROCm/clr commit: f337ae1edb]
2019-08-05 09:51:02 +00:00
Evgeny Mankov b5f0cdaa7b [HIP][HIPIFY] Split HIP_ARRAY_DESCRIPTOR struct to HIP_ARRAY_DESCRIPTOR and HIP_ARRAY3D_DESCRIPTOR
[Reason] To be compatible with CUDA [#1133]

Update HIP code, hipify-clang, tests and docs

[TODO] Add support of the corresponding functions on nvcc fallback path


[ROCm/clr commit: f0832fd968]
2019-07-11 14:58:16 +03:00
Evgeny 96b7f0404e renaming HIP_INIT_CB_API to HIP_INIT_API
[ROCm/clr commit: e362688adf]
2018-11-13 15:33:26 +00:00
Rahul Garg ed5c4bca1d Corrected the width calculation logic to accomodate multi channels
[ROCm/clr commit: a78d68d639]
2018-10-03 12:07:38 +05:30
Rahul Garg 8981438983 Fixed image width for linear resource type texture
[ROCm/clr commit: 167265c279]
2018-10-01 15:28:34 +05:30
Rahul Garg 792b9ebe7c Null check before setting offset
[ROCm/clr commit: f17c897751]
2018-07-24 12:25:40 +05:30
Rahul Garg 99758b3064 Set offset in hipGetTextureAlignmentOffset
[ROCm/clr commit: 0ec64e8b24]
2018-07-24 10:11:26 +05:30