Commit Graph

12238 Commits

Author SHA1 Message Date
Maneesh Gupta 3541d18528 Fix sample module_api_global for hip-clang (#1201)
module_api_global relies on a HCC only feature which allows host code
to write to device variables. This feature does not exist in CUDA
or hip-clang, which causes the sample not working in CUDA or hip-clang.

This patch fixes the sample by using standard features of CUDA and
hip-clang. The fixed sample works in HCC, CUDA and hip-clang.
2019-07-03 08:52:19 +00:00
Yaxun (Sam) Liu 3169f3a881 Add __hip_pinned_shadow__ for hip-clang and fix texture reference tests (#1200) 2019-07-03 08:51:59 +00:00
Maneesh Gupta a220a8e8e9 Added missing NULL checks and corrected API return values (#1188)
* Added missing NULL checks and corrected API return values as per validation

* Added missing NULL checks
2019-07-03 08:51:39 +00:00
Jatin Chaudhary 3cb87cdc46 Adding new unroll example (#1187) 2019-07-03 08:51:19 +00:00
Yaxun Sam Liu 98648828c0 Fix sample module_api_global for hip-clang
module_api_global relies on a HCC only feature which allows host code
to write to device variables. This feature does not exist in CUDA
or hip-clang, which causes the sample not working in CUDA or hip-clang.

This patch fixes the sample by using standard features of CUDA and
hip-clang. The fixed sample works in HCC, CUDA and hip-clang.
2019-07-02 16:36:53 -04:00
foreman 421f8e1b72 P4 to Git Change 1929606 by chui@ocl-promo-incrementor on 2019/07/02 03:00:06
SWDEV-2 - Change OpenCL version number from 2937 to 2938.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2685 edit
2019-07-02 03:09:08 -04:00
foreman 62c0a6f23e P4 to Git Change 1928320 by slinder1@slinder1-fiji-ocllc on 2019/07/01 16:20:37
SWDEV-161424 - Always enable and collect Comgr logging

	Restore changelist 1853517, which was backed out in changelist 1861649

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#49 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#29 edit
2019-07-01 16:23:41 -04:00
Jenkins 54f0e508f9 Merge 'master' into 'amd-master'
Change-Id: I87a09730ec605e2bf13cde52ab5afb79eaeaaf64
2019-07-01 02:12:30 -07:00
foreman e4012b8878 P4 to Git Change 1923808 by chui@ocl-promo-incrementor on 2019/06/30 03:00:05
SWDEV-2 - Change OpenCL version number from 2936 to 2937.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2684 edit
2019-06-30 03:05:05 -04:00
Jenkins 04cbe15857 Merge 'master' into 'amd-master'
Change-Id: Ied8c47046b006252096e0381960b62f5aa95d6d3
2019-06-29 21:09:16 -07:00
eshcherb 0218f95c32 hip_api_name fixed to be inline to suppress not used warning (#1194) 2019-06-30 03:38:43 +00:00
Evgeny Mankov 54dab53c04 Merge pull request #1195 from emankov/master
[HIPIFY] Clang 7.1.0 support
2019-06-29 17:25:07 +03:00
Evgeny Mankov b1bc9caef9 [HIPIFY] Clang 7.1.0 support
+ Provide patch for clang's bug 38811
+ Update Readme.md accordingly
2019-06-29 17:23:18 +03:00
foreman 4df681f713 P4 to Git Change 1922102 by chui@ocl-promo-incrementor on 2019/06/29 03:00:04
SWDEV-2 - Change OpenCL version number from 2935 to 2936.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2683 edit
2019-06-29 03:06:57 -04:00
foreman 35b8eb2f0e P4 to Git Change 1918811 by vsytchen@vsytchen-remote-ocl-win10 on 2019/06/28 14:47:49
SWDEV-193973 - [OpenCL][NV21] Add support for Navi21

	1. Enable OCLOfflineCompilation for gfx1010/1011/1012.
	2. Skip gfx1030 as there is no support for this target in the device libraries for now.

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/17611/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#80 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLOfflineCompilation.cpp#21 edit
2019-06-28 15:01:03 -04:00
foreman 77b6f9c6e7 P4 to Git Change 1918730 by vsytchen@vsytchen-remote-ocl-win10 on 2019/06/28 14:40:48
SWDEV-193973 - [OpenCL][NV21] Add support for Navi21

	1. Add missing mainline checks

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#148 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#88 edit
2019-06-28 14:50:33 -04:00
foreman ccd7799ada P4 to Git Change 1917740 by cpaquot@cpaquot-ocl-lc-lnx on 2019/06/28 12:03:07
SWDEV-193938 - [HIP] RCCL test fails
	Set default stream to null-stream
	In hipStreamWaitEvent if event_ is null, get the last queued command instead.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.hpp#4 edit
2019-06-28 12:09:09 -04:00
foreman 2bc8836012 P4 to Git Change 1917655 by vsytchen@vsytchen-remote-ocl-win10 on 2019/06/28 10:05:26
SWDEV-193973 - [OpenCL][NV21] Add support for Navi21

	1. Recognize gfx10.3 in OpenCL.
	2. Don't report nv12/nv12_lite/nv21 for mainline OpenCL.
	3. Disable nv10_lite/nv21_lite for OpenCL (gfx1000/1020 are not supported by LC).

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/17603/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbedefs#42 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#56 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#147 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#87 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/macros.hpp#13 edit
2019-06-28 10:14:56 -04:00
foreman 6768664780 P4 to Git Change 1917620 by yaxunl@yaxunl-lc10 on 2019/06/28 07:57:46
SWDEV-145570 - Fix device name mismatch.

	Not only gfx906 can have device name with +xnack etc.
	Other devices e.g. gfx900 could have that too.
	Make the previous fix more generic.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#33 edit
2019-06-28 08:06:23 -04:00
foreman c99c79f578 P4 to Git Change 1916766 by chui@ocl-promo-incrementor on 2019/06/28 03:00:05
SWDEV-2 - Change OpenCL version number from 2934 to 2935.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2682 edit
2019-06-28 03:07:06 -04:00
foreman c3f3ef430f P4 to Git Change 1914428 by gandryey@gera-win10 on 2019/06/27 18:22:17
SWDEV-79445 - OCL generic changes and code clean-up
	- Remove all compilaiton flags for LC. LC should be selected dynamically only.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#141 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#146 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#86 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#130 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#312 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/macros.hpp#12 edit
2019-06-27 18:24:28 -04:00
Anusha Godavarthy Surya 1a7c7e3b06 Added missing NULL checks 2019-06-27 20:19:30 +05:30
foreman d3ede521f1 P4 to Git Change 1907374 by chui@ocl-promo-incrementor on 2019/06/27 03:00:43
SWDEV-2 - Change OpenCL version number from 2933 to 2934.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2681 edit
2019-06-27 03:06:25 -04:00
foreman a1235f5e94 P4 to Git Change 1906676 by gandryey@gera-win10 on 2019/06/26 18:29:26
SWDEV-79445 - OCL generic changes and code clean-up
	- Rename targetName_ to machineTarget_

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#55 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#145 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#95 edit
2019-06-26 18:34:23 -04:00
foreman 35e5a800fc P4 to Git Change 1906666 by gandryey@gera-win10 on 2019/06/26 18:13:38
SWDEV-79445 - OCL generic changes and code clean-up
	- Remove unused machineTarget_ and perform dynamic name switch for HSAIL and LC compilation on gfx9.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#54 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#144 edit
2019-06-26 18:22:06 -04:00
Anusha Godavarthy Surya 4989452413 Added missing NULL checks and corrected API return values as per validation 2019-06-27 00:19:05 +05:30
Maneesh Gupta a90871aefe Add dependency on amd_comgr in hip-config-*.cmake.in (#1179)
Change-Id: Ia12a40cd5c89920a50ec714ceae99f60259a6f66
2019-06-26 15:18:11 +05:30
wkwchau 3742f24477 Fixed bug in hipOccupancyMaxPotentialBlockSize for the SGPRs limitation of gfx8 devices (#1176) 2019-06-26 15:18:00 +05:30
foreman 410bbc548d P4 to Git Change 1901838 by chui@ocl-promo-incrementor on 2019/06/26 03:00:14
SWDEV-2 - Change OpenCL version number from 2932 to 2933.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2680 edit
2019-06-26 03:06:58 -04:00
foreman 21bdde5ff9 P4 to Git Change 1896279 by chui@ocl-promo-incrementor on 2019/06/25 03:00:02
SWDEV-2 - Change OpenCL version number from 2931 to 2932.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2679 edit
2019-06-25 03:10:20 -04:00
Maneesh Gupta e0b86d890c [packaging] Add dependency on comgr to hip_hcc package (#1182) 2019-06-25 06:32:46 +05:30
Aaron Enye Shi f87b900f96 Fix dlpi_name info empty when using GCC on ub18 (#1181)
This fixes a bug where GCC++ on Ubuntu 18.04 creates failing executables compared to GCC++ on 16.04 and clang++. While creating function names on Ubuntu 18.04, dl_phdr_info seems to provide a non-zero value for dlpi_addr on initial iteration, and an empty string in dlpi_name. This is causing failure when linking with g++, since the empty string prevents the kernel function from being loaded. Clang++ and GCC on UB16 provide a zero value for dlpi_addr. To fix this, we need to verify both addr and name exists, so that /proc/self/exe can be properly loaded.
2019-06-25 06:32:29 +05:30
Alex Voicu 87eac86298 Put 3-wide vector types on a ketogenic diet. (#1180)
* Put 3-wide vector types on a ketogenic diet.

* Remove needless include.

* Do not be narrow-minded.

* Do not be narrow-minded.

* Put the C people on a diet too.
2019-06-25 06:32:09 +05:30
foreman f22bdc64fd P4 to Git Change 1890418 by chui@ocl-promo-incrementor on 2019/06/24 03:00:03
SWDEV-2 - Change OpenCL version number from 2930 to 2931.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2678 edit
2019-06-24 03:07:13 -04:00
Jenkins 178f06d22f Merge 'master' into 'amd-master'
Change-Id: I81a373b1a9c149e96ede6c72a6c24d99171f8821
2019-06-23 11:47:24 -04:00
foreman 26cfe2c10f P4 to Git Change 1886054 by chui@ocl-promo-incrementor on 2019/06/22 03:00:02
SWDEV-2 - Change OpenCL version number from 2929 to 2930.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2677 edit
2019-06-22 03:09:52 -04:00
foreman 88689fd351 P4 to Git Change 1880770 by chui@ocl-promo-incrementor on 2019/06/21 03:00:08
SWDEV-2 - Change OpenCL version number from 2928 to 2929.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2676 edit
2019-06-21 03:10:01 -04:00
foreman bca0438b69 P4 to Git Change 1879857 by gandryey@gera-win10 on 2019/06/20 18:06:07
SWDEV-184710 - Support hipLaunchCooperativeKernelMultiDevice()
	- Clean-up the loop for the launch on each device
	- Add hipExtLaunchMultiKernelMultiDevice()

	 http://ocltc.amd.com/reviews/r/17573/

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#29 edit
2019-06-20 18:13:20 -04:00
foreman 866533ef00 P4 to Git Change 1876891 by axie@axie_pal_l5 on 2019/06/20 13:11:27
SWDEV-190204 - [CQE OCL][NAVI 14] "Unsupported device(gfx1012) for the test! " for OCLPerfCounters which is subtest of oclruntime.

	Fix the ID converstion array.

	Tests:
	1. run the test in Navi 10.
	2. http://ocltc.amd.com:8111/viewModification.html?modId=122114&personal=true&tab=vcsModificationBuilds
	3. The CQE has confirmed the idea fixed the issue in Navi14

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLPerfCounters.cpp#48 edit
2019-06-20 13:15:54 -04:00
Evgeny Mankov 65e012e5b1 Merge pull request #1175 from emankov/LLVM
[HIPIFY] Fix multiple input files support
2019-06-20 18:08:46 +03:00
Evgeny Mankov 266cf3cf96 [HIPIFY] Fix multiple input files support
Reported in #1168
2019-06-20 18:05:57 +03:00
foreman ea0d95d424 P4 to Git Change 1870160 by chui@ocl-promo-incrementor on 2019/06/20 03:00:02
SWDEV-2 - Change OpenCL version number from 2927 to 2928.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2675 edit
2019-06-20 03:03:22 -04:00
Aryan Salmanpour d6ad690cb6 [hip] implement the hipExtLaunchMultiKernelMultiDevice API (#1165)
* [hip] implement the hipExtLaunchMultiKernelMultiDevice API

* add a guard to check the HCC version for acquire_locked_hsa_queue() API which was introdued in HCC for ROCm 2.5

* modified code based on the requested changes

* changes to lock all streams before launching kernels for each device and unlock them after the dispatches

* check each stream to be valid before starting to lock all the streams
2019-06-20 05:59:05 +05:30
wkwchau 28c34ead70 Implement the hipOccupancyMaxPotentialBlockSize function (#1162)
* Implement the hipOccupancyMaxPotentialBlockSize function

* Replaced hipGetDeviceProperties() call by ihipGetDeviceProperties() in ihipOccupancyMaxPotentialBlockSize()

* Add test for hipOccupancyMaxPotentialBlockSize in Module API

* Added extern declaration for ihipGetDeviceProperties() to be accessed inside ihipOccupancyMaxPotentialBlockSize()

* fixed hipOccupancyMaxPotentialBlockSize test build issue

* Fix hipOccupancyMaxPotentialBlockSize dtest

* Add BUILD_CMD in hipOccupancyMaxPotentialBlockSize dtest

* Revert "Add BUILD_CMD in hipOccupancyMaxPotentialBlockSize dtest"

This reverts commit 0480ff56f1441fc515d2c26ce33783e303423938.

* Disable hipOccupancyMaxPotentialBlockSize dtest on NVCC

* move extern declaration of ihipGetDeviceProperties to hip_module.cpp

* Update the limiation of 32 wavefronts per CU and 800/512 SGPRs for VI/pre-VI chips to calculate the occupancy
2019-06-20 05:58:29 +05:30
Maneesh Gupta 439b6e41d4 Merge pull request #1164 from gargrahul/cleanup_module_api_samples
Add cleanup code in module api samples
2019-06-20 05:57:46 +05:30
Maneesh Gupta 21d9875046 Merge pull request #1173 from icarus-sparry/icarus-sparry-patch-1
Make hip_prof_gen.py compatible with both python 2 and 3
2019-06-19 13:37:02 +05:30
Maneesh Gupta 3083337056 Merge pull request #1171 from mhbliao/hliao/master/hipcc
[hipcc] Revise include path calculation.
2019-06-19 13:36:51 +05:30
Maneesh Gupta 3b3118d459 Merge pull request #1167 from eshcherb/hip_prof_refactoring_190611
prof layer includes refactoring
2019-06-19 13:36:33 +05:30
Maneesh Gupta ad5a15debd Merge pull request #1163 from gargrahul/fix_module_api_kernarg_sample
Fix sample to use kernelargs for launch
2019-06-19 13:36:17 +05:30
foreman 6918dd7e1c P4 to Git Change 1862241 by chui@ocl-promo-incrementor on 2019/06/19 03:00:02
SWDEV-2 - Change OpenCL version number from 2926 to 2927.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2674 edit
2019-06-19 03:10:03 -04:00