Closed ZenggangLiu closed 2 years ago
hipify-clang processes the undefined preprocessor conditional blocks. The reason for this is to try to hipify AMAP. If you need the default C/C++ compiler behaviour use the --skip-excluded-preprocessor-conditional-blocks
option. For the list of available options use the --help
option.
Moreover, your code has a syntactical error here: int id = blockIdx.xblockDim.x+threadIdx.x;
If you need further assistance, please, provide an exact source code as an attachment.
thanks a lot emankov, that option fixes my issue
i am hipifying a test kernel, which has the following layout:
if !defined(PRODUCTION)
error XXXX
endif
extern "C" global void vecAdd(float a, float b, float c, int n) { // Get our global thread ID int id = blockIdx.xblockDim.x+threadIdx.x;
}
but the hipifiy can not handle this. it just splits out "Error while processing..." then exits. not hip file has been generated. In this case, we also need preprocessor support during the hipifying. but it just using the raw lexer.