Commit Graph

206 Commits

Author SHA1 Message Date
Michael LIAO c3604d3120 [hipcc] Revise include path calculation.
- Once HIP_VDI_HOME is defined but HIP_CLANG_INCLUDE_PATH is not,
  calculate it directly without HIP_CLANG_PATH is defined or not;
  Otherwise, we may leave HIP_CLANG_INCLUDE_PATH undefined, if clang is
  not installed following the official way (so far, HIP-Clang breaks
  that), we may leave HIP_CLANG_INCLUDE_PATH undefined before its uses.
2019-06-14 13:35:00 -04:00
Yaxun Sam Liu 154765df88 Fix default HIP_VDI_HOME
There is soft link /opt/rocm/bin/.hipVersion, therefore when hipcc is executed
as /opt/rocm/bin/hipcc, it will set HIP_VDI_HOME to /opt/rocm, which is
incorrect. Check ../lib/bitcode instead to identify HIP_VDI_HOME.
2019-05-31 23:58:59 -04:00
Konstantin Pyzhov 332b19023d Fixed setting HIP_CLANG_PATH on Windows. 2019-05-28 09:38:17 -04:00
Yaxun (Sam) Liu 34b1c6c5b2 Fix hipcc for hip-clang. (#1143)
* Fix hipcc for hip-clang.

If there is -g, do not add -O3 by default.
If HIP_VDI_HOME is not set, set HIP_VDI_HOME based on hipcc directory for HIP/VDI runtime.
For HIP/VDI runtime, set HIP_CLANG_PATH and DEVICE_LIB_PATH based on HIP_VDI_HOME only if they exist.

This allows using HIP/VDI runtime with hip-clang installed at /opt/rocm/llvm and device lib installed
at /opt/rocm/lib.

* Fix HIP_VDI_HOME for hipcc called from /opt/rocm/bin
2019-05-28 09:40:34 +05:30
Maneesh Gupta 68d30cd7e4 Merge pull request #1136 from yxsamliu/fix-rdc
Fix device lib path for hip-clang.
2019-05-24 14:16:30 +05:30
Yaxun Sam Liu 6360570532 Fix device lib path for hip-clang.
We now always need device lib path when compiling and not need it at linking.
2019-05-23 15:11:02 -04:00
Aaron Enye Shi 303ba600d6 Fix hipcc exit code when failing 2019-05-16 20:36:58 +00:00
Michael LIAO 92f90c3651 [hipcc] Repace --rpath with --rpath-link
- With `--rpath`, app's RUNPATH is set to the temporary library path
  during build. Instead, `--rpath-link` should be used to leave RUNPATH
  untouched. User should set LD_LIBRARY_PATH or system ld.so.conf to
  proper setting.
2019-04-29 16:01:16 -04:00
Aaron Enye Shi 235c6877c8 Revert "Use COMgr to read Kernel Args Metadata (#1006)"
This reverts commit 2c80975e9c.
2019-04-26 16:04:56 -04:00
Aaron Enye Shi 2c80975e9c Use COMgr to read Kernel Args Metadata (#1006)
* Add CMAKE dep to amd_comgr

* Use COMGR for read_kernarg_metadata in COV2

* Do not assume kernargs exist

* Add proper metadata destroy cleanup

* Use a process function for easier destroy

* Remove old read_kernarg_metadata

* Clean up HCC, prints, names

* Use COMGR in CMAKE by default

* Move metadata lookup for keyword values into helper

* Remove C string usage for lookup_keyword_value

* Guard COMGR for non-NVCC path

* Add hip_hcc dependency on comgr package

* Add lifetime to metadata nodes

* Find COMGR config file for amd_comgr target

* Move set_active data earlier
2019-04-16 08:34:39 +05:30
Yaxun (Sam) Liu 419eeb4fe0 hip-clang: fix hipcc options
Use -O3 for default optimization level.
Fix --hip-device-lib-path for warnings about unused option.
2019-04-09 22:31:13 -04:00
Yaxun (Sam) Liu 98642129cc hip-clang: add include path for hsa headers 2019-04-09 15:01:50 -04:00
Yaxun Sam Liu 55f4c416a0 Change HIP dll name to amdhip64.dll on Windows 2019-03-19 16:27:18 -04:00
Yaxun Sam Liu b40d9c7849 Revert "hipcc should consume -mcode-object-v3 flag"
This reverts commit 8062305f0b.
2019-02-28 11:21:47 -05:00
Yaxun Sam Liu 9002c7d09d Revert "Change code-object flag to only HIP-Clang"
This reverts commit 2a956540ee.
2019-02-28 11:20:04 -05:00
Yaxun Sam Liu 510590ac1d Revert "Consume the code obj args to prevent duplicates"
This reverts commit 3a57510fbb.
2019-02-28 11:19:35 -05:00
Aaron Enye Shi 3a57510fbb Consume the code obj args to prevent duplicates 2019-02-19 17:02:27 +00:00
Maneesh Gupta 2a575aeda6 Initialize HIP_LIB_PATH on hcc path
Change-Id: I8f392fffcd6a3714c20cb17e876dbaad999c33a0
2019-02-13 09:57:21 +05:30
Maneesh Gupta cc7defa141 Merge pull request #910 from aaronenyeshi/hip-code-obj-v3-passing
hipcc should consume -mcode-object-v3 flag
2019-02-13 08:58:19 +05:30
Aaron Enye Shi 2a956540ee Change code-object flag to only HIP-Clang 2019-02-11 17:18:12 +00:00
Maneesh Gupta b1570ef592 Merge pull request #911 from lmoriche/hip_clang
Allow HIP_LIB_PATH to be overriden at the command line. Use HIP_LIB_P…
2019-02-11 11:26:39 +05:30
Maneesh Gupta 96407ef9ec Merge pull request #903 from yxsamliu/win2
Fix hipcc and hip_vector_types.h for windows
2019-02-11 11:24:03 +05:30
Laurent Morichetti e410ee013c Allow HIP_LIB_PATH to be overriden at the command line. Use HIP_LIB_PATH for rpath instead of HIP_PATH/lib 2019-02-08 13:50:13 -08:00
Aaron Enye Shi 8062305f0b hipcc should consume -mcode-object-v3 flag 2019-02-08 18:29:14 +00:00
Aaron Enye Shi b07fab0727 Add hipInfo path for VDI build 2019-02-07 22:05:14 +00:00
Yaxun Sam Liu d0fc2d0f99 Fix hipcc and hip_vector_types.h for windows
Disable linux specific compilation and linking options for windows.

In hip_vector_types.h, hip-clang needs HIP's own implementation for vector types even
on windows. MSVC specific implementation is for building runtime itself, which is compiled
by MSVC.
2019-02-07 11:07:50 -05:00
Maneesh Gupta 0b32d7813e Merge pull request #898 from yxsamliu/windows
Add windows specific compilation options
2019-02-07 06:00:24 +05:30
Maneesh Gupta e8c2023b38 Merge pull request #894 from davidrohr/PR
Use -isystem instead of -I to suppress warnings in HIP headers
2019-02-07 05:58:47 +05:30
Yaxun Sam Liu 52152368c5 Add windows specific compilation options 2019-02-05 15:31:20 -05:00
David Rohr 8b8e608e63 Use -isystem instead of -I to suppress warnings in HIP headers 2019-02-04 15:07:06 +01:00
Aaron Enye Shi 869b3b6a10 Add HIP_RUNTIME for HCC or VDI 2019-02-01 22:30:30 +00:00
Aaron Enye Shi 63aad50098 hipcc defaults to HIP-Clang if built with HIP-Clang
Add HIP_COMPILER to hipConfig, so that HIP packages built with HIP_COMPILER for HIP-Clang will be known during runtime by hipcc. Also add default locations to check for llvm and device-libs.
2019-02-01 16:52:55 +00:00
Maneesh Gupta a2de2a40d9 Merge pull request #776 from yxsamliu/fix-vdi-path
Let hipcc handle HIP_VDI_HOME without x86_64
2018-11-28 09:33:03 +05:30
Yaxun Sam Liu 988dcd1e4a Let hip-clang support --genco 2018-11-27 15:55:50 -05:00
Yaxun Sam Liu 0e8bc94a3f Let hipcc handle HIP_VDI_HOME without x86_64 2018-11-26 17:00:37 -05:00
Yaxun Sam Liu 8fef5618ed Let hipcc handle clang-offload-bundler file in obj format for hip-clang 2018-11-08 16:50:34 -05:00
Maneesh Gupta c7f2198c6e Merge pull request #714 from aaronenyeshi/remove-static-hip-device
Remove libhip_device.a static library
2018-10-31 14:08:29 +05:30
Aaron Enye Shi ba43d1ce1b Remove libhip_device.a static library
Move remaining function definitions from device_util.cpp to hip_runtime.h header. We can now remove the static library completely as device_util.cpp was the last file part of target hip::hip_device .
2018-10-25 19:52:35 +00:00
Yaxun Sam Liu 1f7b924e2e Let hipcc handle gfx906 for hip-clang 2018-10-21 10:04:30 -04:00
Maneesh Gupta 6a4aaed7f3 Merge pull request #698 from yxsamliu/compile-flags
Add HIPCC_COMPILE_FLAGS_APPEND
2018-10-17 10:53:17 +05:30
Yaxun Sam Liu 88768895bc Let hipcc add --hip-device-lib-path by default for hip-clang
hip-clang by default assumes -fno-gpu-rdc, therefore requires
--hip-device-lib-path by default.
2018-10-01 15:14:54 -04:00
Yaxun Sam Liu 2c361906fa Add HIPCC_COMPILE_FLAGS_APPEND 2018-10-01 14:51:29 -04:00
Maneesh Gupta c6d0de2c21 Merge pull request #637 from ROCm-Developer-Tools/add-pthread
Let hipcc link -lpthread -lm by default
2018-09-14 13:21:47 +05:30
Yaxun Sam Liu 7d1492ab61 Let hipcc link -lpthread -lm by default 2018-09-04 17:11:47 -04:00
Yaxun Sam Liu 627c179612 Let hipcc handle obj files in linker response file for hip-clang
If obj files in linker response file contains device code, pass them to hip-clang, otherwise keep them in the linker
response file.
2018-09-04 16:57:55 -04:00
Maneesh Gupta 2f5ee304f8 [hipcc] Remove libhsakmt from linker flags
Change-Id: I6dc769d09d8c7546fbc594c1eb65f9edf0f0ff58
2018-08-14 15:31:04 +05:30
Maneesh Gupta 695746421f Merge pull request #616 from ROCm-Developer-Tools/hip-clang-static-lib
Let hipcc handle static library for hip-clang
2018-08-10 09:35:22 +05:30
Yaxun Sam Liu 2ba45a23b8 Let hipcc handle static library for hip-clang 2018-08-01 22:03:01 -04:00
Yaxun Sam Liu b91691966f Add HCC compatibility mode 2018-08-01 15:14:38 -04:00
Maneesh Gupta 2027675b3f [hipcc] Initialize CUDA_PATH before printing
Change-Id: Ifd448b628fa4a7055f4a439ed2c817c5f11f9bef
2018-07-25 15:29:57 +05:30