+ '-D' might be set as hipify-clang option (before separator '--' or without specifying separator at all);
+ '-D' as a clang option might be specified as well (after options separator '--');
+ All defines specified as hipify-clang defines (before options separator '--') will be set after clang's ones and will redefine the same clang's ones.
+ '-I' might be set as hipify-clang option (before separator '--' or without specifying separator at all);
+ '-I' as a clang option might be specified as well (after options separator '--').
+ Append '--' to the end of hipify-clang options in case of its absence.
[Reason]
+ Avoid the necessity for the user in JSON compilation database specification.
Otherwise:
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "test.cu"
Though the hipification will be performed correctly without JSON database.
Repeats clang's '--cuda-path' option.
[Reason]
In case of absence of any other clang's options setting '-cuda-path' allows not to specify separator '--' before clang's '--cuda-path'.
+ Tests and scripts are updated accordingly.
A hash calculated via FNV-1a algorithm is introduced in ihipModule_t, the
internal of hipModule_t. The hash is used by HIP module APIs such as
- read_agent_global_from_module
to determine whether the agent-scope globals for a module have been iterated.
This commit fixes one issue that applications which load / unload modules
frequently would occasionally fail. After deep investigation of the issue it
turns out the old implementation in read_agent_global_from_module uses
hipModule_t as the key, which is not robust enough, as hipModule_t instances
are allocated dynamically so there are cases that one memory address may be
used by multiple hipModule_t instances. The real solution is to introduce a
uniquely identifiable hash for the code object associated with the HIP module.
And that's the rationale behind this commit.
hipify-clang could be built by Visual Studio 14 2015 or higher.
[Reason]
hipify-clang contains c++14 features which are not supported even by the latest VS 2013 and the Platform Toolset "Visual C++ Compiler Nov 2013 CTP".
- Improved install instructions for AMD-hcc and NVIDIA-nvcc.
- Removed redundant section related to HCC-Native-GCN-ISA.
Change-Id: I33a9e71d95df51dbdcade4a48834840146bdbe6f