-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HIPIFY] Errors when processing the NVIDIA sample "simpleCubemapTexture" #134
Comments
Not sure if this is relevant, but also had issues with other samples as follows.
, and
even though MATH_FUNCTIONS_DECL is defined as |
@wuren2020, P.S. |
For the origin issue (error output with "error: use of undeclared identifier '__nv_tex_surf_handler'") Overall there are around 40 files have this issue |
The original bug: https://bugs.llvm.org/show_bug.cgi?id=26400, which was finally fixed in clang only in Sept 2021 by https://reviews.llvm.org/D110089. hipify-clang should be built against the latest trunk LLVM (currently, 14.0.0git). The command line to test: hipify-clang --print-stats --cuda-path="c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5" "c:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.5/0_Simple/simpleCubemapTexture/simpleCubemapTexture.cu" --skip-excluded-preprocessor-conditional-blocks -I"c:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.5\common\inc" -- -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH Output: In file included from C:\Users\TT\AppData\Local\Temp\simpleCubemapTexture.cu-aeae30.hip:31:
In file included from c:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.5\common\inc\helper_functions.h:35:
c:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.5\common\inc\helper_image.h:409:14: warning: 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
FILE *fh = fopen(filename, "rb");
^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
^
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.31.30818\include\vcruntime.h:335:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
#define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \
^
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.31.30818\include\vcruntime.h:325:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
^
1 warning generated when compiling for host.
[HIPIFY] info: file 'c:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.5/0_Simple/simpleCubemapTexture/simpleCubemapTexture.cu' statistics:
CONVERTED refs count: 40
UNCONVERTED refs count: 0
CONVERSION %: 100.0
REPLACED bytes: 783
TOTAL bytes: 8690
CHANGED lines of code: 35
TOTAL lines of code: 254
CODE CHANGED (in bytes) %: 9.0
CODE CHANGED (in lines) %: 13.8
TIME ELAPSED s: 6.99
[HIPIFY] info: CONVERTED refs by type:
device: 3
memory: 11
texture: 3
include_cuda_main_header: 1
type: 10
numeric_literal: 9
define: 1
kernel_launch: 2
[HIPIFY] info: CONVERTED refs by API:
CUDA RT API: 40
[HIPIFY] info: CONVERTED refs by names:
cudaAddressModeWrap: 3
cudaArray: 1
cudaArrayCubemap: 1
cudaChannelFormatDesc: 1
cudaChannelFormatKindFloat: 1
cudaCreateChannelDesc: 1
cudaCreateTextureObject: 1
cudaDestroyTextureObject: 1
cudaDeviceProp: 1
cudaDeviceSynchronize: 2
cudaFilterModeLinear: 1
cudaFree: 1
cudaFreeArray: 1
cudaGetDeviceProperties: 1
cudaLaunchKernel: 2
cudaMalloc: 1
cudaMalloc3DArray: 1
cudaMemcpy: 1
cudaMemcpy3D: 1
cudaMemcpy3DParms: 1
cudaMemcpyDeviceToHost: 1
cudaMemcpyHostToDevice: 1
cudaReadModeElementType: 1
cudaResourceDesc: 2
cudaResourceTypeArray: 1
cudaTextureDesc: 2
cudaTextureObject_t: 2
cuda_runtime.h: 1
make_cudaExtent: 2
make_cudaPitchedPtr: 1
make_cudaPos: 2 |
Using HIPIFY to process the simpleCubemapTexture example shipped in the CUDA 10.2 toolkit (commands:
cd /path/to/NVIDIA_CUDA-10.2_Samples/0_Simple/simpleCubemapTexture; hipify-clang simpleCubemapTexture.cu -- -I/path/to/NVIDIA_CUDA-10.2_Samples/common/inc
) produces the following error:Any thoughts will be appreciated.
The text was updated successfully, but these errors were encountered: