Christophe Paquot
94a7ef6ed1
Do not retry to allocate when OOM. Shouldn't be needed since we idle on Free.
...
SWDEV-229214
Change-Id: I183006f409388e3c7981f2569649d01d6378be46
2020-03-30 12:49:48 -07:00
kjayapra-amd
b081912962
SWDEV-216213 - Use different static & dynamic module maps for faster lookup.
...
Change-Id: Ia605e76a411ad5be04046b9d61f1ac111d49bb4a
2020-03-30 14:28:07 -04:00
Anusha Godavarthy Surya
caa083357a
Merge "Update Enable/Disable peers to match cuda behaviour" into amd-master-next
2020-03-30 13:46:42 -04:00
agodavar
bdb3a4b393
Update Enable/Disable peers to match cuda behaviour
...
Change-Id: I67194ccf77a0019368579ff7d95b7790fcf228f3
2020-03-30 12:49:16 -04:00
Michael LIAO
3a690e960f
[vdi] Fix calculation of MaxWaves
...
- Consider the case where `usedVGPRs` is zero.
- This fixes [SWDEV-228537](http://ontrack-internal.amd.com/browse/SWDEV-228537 )
Change-Id: I8675311f5fe24fb59c5d45bada122afefb55b128
2020-03-30 09:10:16 -04:00
Saleel Kudchadker
5a8add03a5
Merge "Check event status before notify" into amd-master-next
2020-03-27 20:19:40 -04:00
Vladislav Sytchenko
6ed73f50f7
(SWDEV-228794)
...
Adjust the origin of the copy if the user passes a pointer that wasn't allocated by the runtime.
Change-Id: I0aeb20195ed730857a461a53f537626ec2573fd1
2020-03-27 16:33:16 -04:00
Vladislav Sytchenko
fd7a8f0367
(SWDEV-228794)
...
Add hipMallocHost()
Change-Id: Ia3c7c5ca94b39fe30f3a51d1b60782d3472259ff
2020-03-27 15:57:48 -04:00
Vladislav Sytchenko
a91b82f00e
(SWDEV-228782)
...
The only requirment from hipMallocPitch() is that the returned pitch is aligned to the HW image pitch alignment. There is no restriction on the size of the allocation, since the memory might not be used for images.
Change-Id: I97438e5fe4012ca4721b14b85f514dbac803c17c
2020-03-27 15:52:17 -04:00
Saleel Kudchadker
178fc17846
Check event status before notify
...
Change-Id: I68f6bbbf236e49b859be2d5afbe0c8282fe15dd3
2020-03-27 11:32:46 -07:00
Vladislav Sytchenko
2a2b9e47a0
Add support for formating hipExtent objects
...
Change-Id: Iea54a510e81a856c0c450305b3e5a7179ee48295
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko
e0187ba405
Add initial entry points for mipmapped array API
...
Change-Id: Icd59cc7323ddcb6773da6105260415a1e6f4cdcb
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko
c1475f948e
Replace hip::TextureObject with __hip_texture
...
This avoids the use of extra casts when obtaining a texture object handle.
Change-Id: I42df22bdad0ab9ac6c33cb8b282dee65fe7cfd6e
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko
2028b6eb29
Headers need to export C symbols for texture API
...
This also adds declarations of all the missing texture APIs.
hipTexRefSet*() functions need to take a textureReference as a ptr for type erasure to work. Runtime has been modified to accomodate this.
This change only applies to VDI.
Change-Id: Icf43cc5bd44dfc2c39084b7fe56d5a793bf7319f
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko
8ddeeb4551
Enable initial sRGB support
...
Instead of using the sampler field force_degamma to perform sRGB->linear conversion during pixel sampling, we use an appropriate image format instead. The overhead of this is having to create an image view when creating a texture object from an array.
Change-Id: I1ca368c312c1fd4b6f784a3a1b35b5eeb28070ff
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko
faf3b83594
Handle offsets for dptr <-> image copies
...
Change-Id: I7a4a56ee07a26a741d2aac35502446d248f720ad
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko
fbe30090a2
Correctly format hipResourceDesc objects
...
The struct consists of a union - only the active object should be read.
Change-Id: I1c40965b61518acd91a2dcbae92a015ac9be346a
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko
39558dc1b9
Modify formatting for textureReferences
...
We don't program the numChannels and format members (these are HCC specific), so printing these will only display garbage.
Change-Id: I83dc8be9a3cae2659c64f4594d07c05330d2dd14
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko
ea701777d8
Allow creating texture from unaligned user ptr
...
All we have to do is align the ptr to HW requirments an if it's not zero, then return the offset to the user.
We currently don't have anywhere to store this offset, so hipGetTextureAlignmentOffset() will still always return 0.
Change-Id: If31998127d99a2a3222a026d88249519d6102505
2020-03-26 12:43:17 -04:00
Payam
76703acb1d
updated cmake to create libamdhip64 static file as well
...
Change-Id: I2054b9501cefa232abbf398524ab62450ab6805d
2020-03-25 16:37:57 -04:00
Saleel Kudchadker
91069c0de4
Merge "Sync streams when freeing or destroying mem" into amd-master-next
2020-03-21 13:33:41 -04:00
Christophe Paquot
653277bd3f
hipStreamAddCallback test seg faults
...
Change-Id: If419d2fad490d0ed50eb1315af809fc1deda1ce3
SWDEV-227875: Add a lock in streams to lock when the callback is call so we make sure things aren't moving forward in the stream
2020-03-20 13:07:34 -07:00
Saleel Kudchadker
8b39e0b74e
Sync streams when freeing or destroying mem
...
Change-Id: I6932f225a8b932bb2adbd5e37880f7e604496809
2020-03-20 10:53:23 -07:00
Christophe Paquot
d98879a250
Merge "hipStreamAddCallback test seg faults" into amd-master-next
2020-03-20 12:05:37 -04:00
kjayapra-amd
cd92bd7fee
SWDEV-216213 - Lookup module functions from PlatformState::functions_.
...
Change-Id: I91dfe327f2ebdcf4c9b39ddd14d60aa0ce2fa9f4
2020-03-20 11:52:28 -04:00
Christophe Paquot
3dfbfc408b
hipStreamAddCallback test seg faults
...
Change-Id: I1f107fc8a5c586cd571f0280ed8716c5f89d25b7
SWDEV-227875: Need to add a dummy marker in case the stream is empty.
2020-03-19 11:11:59 -07:00
Vladislav Sytchenko
4829a7c215
Add support for creating typed buffers
...
What Cuda refers to "linear texture memory" is the OpenCL equivalent of CL_MEM_OBJECT_IMAGE1D_BUFFER. For these types of allocations we should create a typed buffer instead of an image.
Currently there is no check in the texture fetch functions as to what kind of SRD is written into the texture object, so any kind of incorrect programming will cause the TA to hang. Fortunately for us, every one writes correct code :)
Change-Id: I80dab85a992f2c0754ebf303d40ac6b5e045c7c1
2020-03-18 18:15:17 -04:00
Vladislav Sytchenko
e8fa3b2589
Program texture flags in a better way
...
Not sure what I was thinking when initially implementing this...
Change-Id: Ib82f0f5a86683c08823dd4b59c98259d27151822
2020-03-18 18:15:09 -04:00
Vladislav Sytchenko
2bad9e2821
Purge the use of ihip*impl() texture APIs
...
These are artifacts left from HIP-HCC and now are not needed by HIP-VDI.
Change-Id: Ib25a1081fe6146c8a89659395151e9d5bdaf7519
2020-03-18 18:15:01 -04:00
Vladislav Sytchenko
7385a032ae
Correctly infer the texture read mode
...
Currently we extract the read mode from the ihip*impl() calls, which is not correct. We should be getting it from the texture itself directly.
Change-Id: Idf6449fefa395a887138a252e8ea937a6897e600
2020-03-18 18:14:45 -04:00
Vladislav Sytchenko
c7407a3b57
Correct the definition of ...
...
hipBindTextureToMipmappedArray()
The texture reference needs to be passed as a constant pointer.
Change-Id: I6d31204c7f2325a5bc1e8b6e089fd9f8d21d1d78
2020-03-18 18:14:36 -04:00
Vladislav Sytchenko
3e460ab514
Correct the declaration of hipBindTexture2D()
...
The texture reference needs to be passed as a constant pointer.
Change-Id: Idde461f0f328ac87ce677b6bab3203161b514cbf
2020-03-18 18:08:23 -04:00
Vladislav Sytchenko
2d77399747
Correct the declaration of hipBindTextureToArray()
...
The texture reference needs to be passed as a constant pointer.
Change-Id: Iff171626536071fb2020cfff7132ec930577b1b9
2020-03-18 18:08:13 -04:00
Vladislav Sytchenko
7190fa518e
Correct the declaration of hipBindTexture()
...
The texture reference needs to be passed as a constant pointer.
Change-Id: I36ca0bddaba30becfc2ce70dd9e5b7db66c57f27
2020-03-18 18:08:01 -04:00
Vladislav Sytchenko
816a56a70b
Merge "Start the lifetime of the texture reference" into amd-master-next
2020-03-18 18:07:24 -04:00
Jiabao Xie
ae6dd6c2fc
Merge "Cleaned include statements and deleted unnecessary operator overloads" into amd-master-next
2020-03-18 14:37:19 -04:00
Vladislav Sytchenko
292d008a64
Start the lifetime of the texture reference
...
reinterpret_cast<> doesn't create an object, so the texref is actually unitiliazed. This may lead to garbage data in some of its struct members.
Initialize it by performing a placement new. The constructer should set all of its members to default values. There's no way currently to extract the channel type, so use single channel char for now.
Change-Id: I41b305a75bb3f30130324de785099f55b3e130c7
2020-03-18 12:30:11 -04:00
Sarbojit Sarkar
82926666c4
[hip-vdi]Fix for TF build failure [SWDEV-225827]
...
Change-Id: I8478779bef92bad8353b8d066b28c220bb59b98d
2020-03-17 22:52:01 -04:00
Jiabao Xie
e7abc7a553
Cleaned include statements and deleted unnecessary operator overloads
...
Change-Id: I5eb322c05082e8f27584446af2f6a19243dc63c9
2020-03-12 14:13:01 -04:00
Saleel Kudchadker
ffcbd7e633
Merge "Fix P4 linux make builds" into amd-master-next
2020-03-11 16:17:18 -04:00
Jiabao Xie
edce444e33
Merge "Structs expanded to print struct information than address. Moved to hip_formatting.hpp. Reformatted to follow Google standards" into amd-master-next
2020-03-10 15:56:49 -04:00
Jiabao Xie
604befb472
Structs expanded to print struct information than address. Moved to hip_formatting.hpp. Reformatted to follow Google standards
...
Change-Id: I08695058c11db51b9f3cbe1deb4af944ebf9e64d
2020-03-10 13:12:28 -04:00
Saleel Kudchadker
aa04b964cf
Fix P4 linux make builds
...
Change-Id: I6cc4e69a914389b53bc3b52535eb6faf24897a09
2020-03-10 00:02:10 -07:00
Saleel Kudchadker
bcd23335fb
Merge "Change HIPRTC Version to 9.0" into amd-master-next
2020-03-09 22:55:27 -04:00
Vladislav Sytchenko
ecd7c99b49
Add hipDrvMemcpy3D.
...
This is the equivalent of cuMemcpy3D.
Change-Id: Ib2e06dbd6f5093c931cdfd36c87617f32acffc2d
2020-03-09 16:11:25 -04:00
Saleel Kudchadker
c540a55d21
Change HIPRTC Version to 9.0
...
Change-Id: I7e88df61248f0fe6e33c2315805f9e49a493cf29
2020-03-09 11:28:55 -07:00
Saleel Kudchadker
08c6d941ca
Fix HIPRTC headers to export C style symbols
...
Change-Id: I3e0d2b19ace4a9096e3e46bd22f420483da51a8a
2020-03-09 14:18:46 -04:00
Vladislav Sytchenko
38004b6ef0
Fix Windows build.
...
extern "C" on Windows implies nothrow. We shouldn't be throwing exceptions either way.
Change-Id: If0ed1f7ec194bf7f65b7cea1a5c250e768a8f190
2020-03-09 11:46:55 -04:00
Vladislav Sytchenko
2e9d177304
Add hipMemcpy3DParams -> HIP_MEMCPY3D conversion
...
Change-Id: I66dd1ae722b8c0d7ddb2562c958b14854e6b86bc
2020-03-06 14:33:52 -05:00
Vladislav Sytchenko
dbb8f96a8e
Fix dangling pointer after hipUnbindTexture() call
...
Change-Id: Ic4b476c62ebfae31e94dd139b20b6aaaa52bb866
2020-03-06 14:10:56 -05:00