Skip to content
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

aligned-types-hip and egs-hip : align types broken in ChipStar #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kballeda
Copy link
Contributor

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)

@kballeda kballeda changed the title Compilation issue fix - aligned-types-hip Hip Compilation issue fix - aligned-types-hip due to align signature Aug 19, 2023
@zjin-lcf
Copy link
Owner

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

@kballeda
Copy link
Contributor Author

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.

@zjin-lcf
Copy link
Owner

I will not update the program because it can be compiled without error with HIPCC on AMD GPUs. Thanks.

@zjin-lcf zjin-lcf closed this Aug 24, 2023
@kballeda
Copy link
Contributor Author

kballeda commented Aug 25, 2023

Thanks for the update I will follow up on CHIP-SPV/chipStar#593 CHIP-SPV/chipStar#484

@kballeda
Copy link
Contributor Author

@zjin-lcf Please reopen this this PR as it is yet to be resolved by ChipStar team.

@zjin-lcf zjin-lcf reopened this Sep 18, 2023
@kballeda
Copy link
Contributor Author

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

@kballeda kballeda changed the title Hip Compilation issue fix - aligned-types-hip due to align signature aligned-types-hip and egs-hip : align types broken in ChipStar Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants