نمودار کامیت

24 کامیت‌ها

مولف SHA1 پیام تاریخ
Vladislav Sytchenko 511f2d03a2 (SWDEV-228794)
Adjust the origin of the copy if the user passes a pointer that wasn't allocated by the runtime.

Change-Id: I0aeb20195ed730857a461a53f537626ec2573fd1


[ROCm/hip commit: 6ed73f50f7]
2020-03-27 16:33:16 -04:00
Vladislav Sytchenko d3b9203359 (SWDEV-228794)
Add hipMallocHost()

Change-Id: Ia3c7c5ca94b39fe30f3a51d1b60782d3472259ff


[ROCm/hip commit: fd7a8f0367]
2020-03-27 15:57:48 -04:00
Vladislav Sytchenko 7a867cd98f (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


[ROCm/hip commit: a91b82f00e]
2020-03-27 15:52:17 -04:00
Vladislav Sytchenko ec09381120 Add support for formating hipExtent objects
Change-Id: Iea54a510e81a856c0c450305b3e5a7179ee48295


[ROCm/hip commit: 2a2b9e47a0]
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko c1b7b2276e Add initial entry points for mipmapped array API
Change-Id: Icd59cc7323ddcb6773da6105260415a1e6f4cdcb


[ROCm/hip commit: e0187ba405]
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko 99b2084641 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


[ROCm/hip commit: 8ddeeb4551]
2020-03-26 14:45:20 -04:00
Vladislav Sytchenko b48bf1dc8c Handle offsets for dptr <-> image copies
Change-Id: I7a4a56ee07a26a741d2aac35502446d248f720ad


[ROCm/hip commit: faf3b83594]
2020-03-26 14:45:20 -04:00
Saleel Kudchadker 1b4bbfcb53 Sync streams when freeing or destroying mem
Change-Id: I6932f225a8b932bb2adbd5e37880f7e604496809


[ROCm/hip commit: 8b39e0b74e]
2020-03-20 10:53:23 -07:00
Vladislav Sytchenko 2847cdc6f0 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


[ROCm/hip commit: 4829a7c215]
2020-03-18 18:15:17 -04:00
Vladislav Sytchenko 88ae7337b3 Add hipDrvMemcpy3D.
This is the equivalent of cuMemcpy3D.

Change-Id: Ib2e06dbd6f5093c931cdfd36c87617f32acffc2d


[ROCm/hip commit: ecd7c99b49]
2020-03-09 16:11:25 -04:00
Vladislav Sytchenko 2f8a37880d Add hipMemcpy3DParams -> HIP_MEMCPY3D conversion
Change-Id: I66dd1ae722b8c0d7ddb2562c958b14854e6b86bc


[ROCm/hip commit: 2e9d177304]
2020-03-06 14:33:52 -05:00
Vladislav Sytchenko 9a62b2ffe7 Correct logic in ihipMemcpyAtoA()
HIP assumes that image width is in bytes, but VDI assumes that image width in pixels. Need to perform byte -> pixel coversion before doing anything.

Change-Id: Ia9fd1f46d05db3fbe8049add10b4d7e5118a2b9a


[ROCm/hip commit: 3fc50731ae]
2020-03-05 15:03:18 -05:00
Vladislav Sytchenko 2f2a2843dc Fix typos in ihipMemcpy3D()
Change-Id: I8720f113642f00bb013cf46284e9b13cc932bf4a


[ROCm/hip commit: f28e2ebb42]
2020-03-05 14:11:55 -05:00
agodavar de0b92948e Enable tests that are passing on hip-vdi
Change-Id: I7de965f7e8bb7e4d0fa61cd584f0cd118c1e212e


[ROCm/hip commit: 65ffaf82d8]
2020-03-05 16:08:51 +05:30
Vladislav Sytchenko 05c26e5aa7 Fix hipMemcpy3d (partially)
Incoming changes from upstream split the struct hipMemcpy3DParms into two separate ones - hipMemcpy3DParms and HIP_MEMCPY3D, which are cudaMemcpy3DParms and CUDA_MEMCPY3D equivalents respectively.

Note that HIP_MEMCPY3D is missing half the members of CUDA_MEMCPY3D (this should be fixed in PR#1887). Work around this by using a substitute _HIP_MEMCPY3D struct for now.

Change-Id: Ic15134e6deb260189b662b3804d2309a9b8473e9


[ROCm/hip commit: 87178f9456]
2020-03-01 13:52:05 -05:00
Christophe Paquot e673e8e0c9 Blocking and default streams' sync:
Add hip::syncStreams(dev) to sync blocking streams on a given device.
hip::syncStreams(void) should only sync streams on the current device.

Change-Id: Ib6b0735215fa0ed12c646ebd029e9763ee3712ce


[ROCm/hip commit: fa6ed89cff]
2020-02-26 08:54:00 -08:00
Saleel Kudchadker afbb96f6b6 Use the context variant of getNullStream
Do not create a new queue to call finish in hipFree if none was
created earlier elsewhere.
Change-Id: I87bb191e6b186ddbe607ab29d11e3ae5bc2ac8e6


[ROCm/hip commit: 631fd65be4]
2020-02-25 00:13:43 -08:00
Christophe Paquot c8bce5553d Fixed a few multithreaded potential issues
Also make D2H and H2D keep track of the chain of events
when we need to use a different HostQueue.

Change-Id: I1c5da6ea6104b37ad7aac00f0eb8ea9371e6ba1c


[ROCm/hip commit: 2203093159]
2020-02-24 20:14:10 -08:00
Vladislav Sytchenko 82a8810572 HIP-VDI texture rework
The current texture implementation is based off the one for HIP-HCC. There's a lot of problems with it - only creating images from buffers, hard coding logic and ignoring user parameters. This leads to a whole lot of UB even with simple examples (as seen with RedShift's code).

This CL is aimed to bring the HIP-VDI texture implementation closer to what is described by Cuda.

hipMemcpyAtoA() - image to image copy.
hipMemcpyHtoA()/hipMemcpyDtoA() - buffer to image copy.
hipMemcpyAtoH()/hipMemcpyAtoD() - image to buffer copy.

hipArrayCreate()/hipArray3DCreate()/hipMallocArray()/hipMalloc3DArray() - creates 1D/2D/3D/1D Array/2D Array images.
hipCreateTextureObject() - creates sampler, (optional) creates 1D/2D image from buffer, (optional) creates image views.
hipBindTexture() - creates 1D image from buffer (should create a typed buffer, however this is not compatible with HIP-HCC).
hipBindTexture2D() - creates 2D image form buffer.
hipBindTextureToArray() - creates image view.
hipTexRefSetAddress() - creates 1D image from buffer (should create a typed buffer, however this is not compatible with HIP-HCC).
hipTexRefSetAddress2D() - creates 2D image from buffer.
hipTexRefSetArray() - creates image view.

There are still a lot of  TODOs in the code, here's a few important ones:
1. VDI doesn't support a lot of sampler flags.
2. VDI doesn't support device to image 2D/3D copy.
3. Mipmaps implementation is incomplete.
4. Image view implementation is incomplete.

Change-Id: Ia374ee27aa14f76451fee7667495036f4419a487


[ROCm/hip commit: c22eb7808d]
2020-02-24 15:23:45 -05:00
Christophe Paquot c8b083f1c6 SWDEV-223262
hipMemcpyWithStream is supposed to be synchronous.

Change-Id: Ie44e37ecc9246e26a6b315c01e88a279f9e42fd7


[ROCm/hip commit: a9a6cae956]
2020-02-19 14:08:12 -08:00
Christophe Paquot 912bc9b38c Introducing hip::Device which wraps around amd::Context and deviceId
Change-Id: Ie35a6edb65c001b35eb9f5d2af26e765dc41c00e


[ROCm/hip commit: 9630e40beb]
2020-02-18 17:18:56 -05:00
Christophe Paquot 652e82f726 SWDEV-220533 - HostMapped should use fine grained.
Change-Id: I4ad2064e8e5ea1cd4ed7df143c778ccb685c4f22


[ROCm/hip commit: 6462732e49]
2020-02-10 16:53:06 -05:00
Laurent Morichetti ed5081c945 Update copyright info for VDI files
Change-Id: Ib160fbf89ec89a5895321f73402a33b4d344a68f


[ROCm/hip commit: 2764aee583]
2020-02-04 08:47:10 -08:00
Laurent Morichetti cbd1b27c5e Merge HIP/VDI branch 'amd-staging' into lmoriche/amd-master-next
Change-Id: Iabaab4e72815ba483a1330ec6a1130f2b86676f0


[ROCm/hip commit: e604beeef4]
2020-01-29 15:02:13 -08:00