aligned-types-hip and egs-hip : align types broken in ChipStar
This PR fixes compilation issue related to aligned-types
Compile errors: hipcc -std=c++14 -Wall -g -O3 -c main.cu -o main.o main.cu:65:26: error: expected unqualified-id typedef struct align(4) ^ main.cu:65:26: error: expected ')' main.cu:65:25: note: to match this '(' typedef struct align(4) ^ main.cu:69:1: error: a type specifier is required for all declarations uchar4_aligned; ^ main.cu:73:26: error: expected unqualified-id typedef struct align(8) ^ main.cu:73:26: error: expected ')' main.cu:73:25: note: to match this '(' typedef struct align(8)
Thank you for the pull request. Which version of HIP is installed on your end? I don't see any compilation issue with 5.4.0
Thank you for the pull request. Which version of HIP is installed on your end? I don't see any compilation issue with 5.4.0
@zjin-lcf - Thanks for the review. hipcc is ChipStar (https://github.com/CHIP-SPV/chipStar.git) in this case.
I will not update the program because it can be compiled without error with HIPCC on AMD GPUs. Thanks.
Thanks for the update I will follow up on https://github.com/CHIP-SPV/chipStar/issues/593 https://github.com/CHIP-SPV/chipStar/issues/484
@zjin-lcf Please reopen this this PR as it is yet to be resolved by ChipStar team.
I found that egs-hip is also facing same issue,
hipcc -std=c++14 -Wall -O3 -c main.cu -o main.o In file included from main.cu:38: ./EGS.h:374:26: error: expected unqualified-id typedef struct align(16) region_data_t { ^ ./EGS.h:374:26: error: expected ')' ./EGS.h:374:25: note: to match this '(' typedef struct align(16) region_data_t { ^ ./EGS.h:380:3: error: a type specifier is required for all declarations } region_data_t; ^ ./EGS.h:382:1: error: unknown type name 'region_data_t' region_data_t *d_region_data; ^ ./EGS.h:383:14: error: unknown type name 'region_data_t' constant region_data_t *region_data; ^ In file included from main.cu:40: ./media.c:72:26: error: expected unqualified-id typedef struct align(16) rayleigh_data_t { ^ ./media.c:72:26: error: expected ')' ./media.c:72:25: note: to match this '(' typedef struct align(16) rayleigh_data_t { ^ ./media.c:77:3: error: a type specifier is required for all declarations } rayleigh_data_t; ^ ./media.c:82:1: error: unknown type name 'rayleigh_data_t' rayleigh_data_t *d_rayleigh_data; ^ ./media.c:86:14: error: unknown type name 'rayleigh_data_t' constant rayleigh_data_t *rayleigh_data; ^ ./media.c:898:55: error: expected expression rayleigh_data_t h_rayleigh_data = (rayleigh_data_t)malloc(nmed * MXRAYFF * sizeof(rayleigh_data_t)); ^ ./media.c:898:20: error: use of undeclared identifier 'h_rayleigh_data' rayleigh_data_t h_rayleigh_data = (rayleigh_data_t)malloc(nmed * MXRAYFF * sizeof(rayleigh_data_t)); ^ ./media.c:902:5: error: use of undeclared identifier 'h_rayleigh_data'; did you mean 'd_rayleigh_data'? h_rayleigh_data[i].xgrid = (float)h_xgrid[i]; ^~~~~~~~~~~~~~~ d_rayleigh_data
https://github.com/CHIP-SPV/chipStar/pull/659/files