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

Fixing a HIP bug that causes DEBUG symbols to be dropped. #588

Merged
merged 1 commit into from Aug 3, 2018

Conversation

Jorghi12
Copy link
Contributor

@Jorghi12 Jorghi12 commented Jul 23, 2018

I've noticed that in the generated makefiles, we'd have

if(NOT build_configuration)
    set(build_configuration Debug)
endif()

However, if you take a look at lines 442 through 448, all the configuration endings are capitalized. Since CMake is case sensitive, you'll end up with empty Debug flags.

i.e. we'd end up setting HIP_HCC_FLAGS_DEBUG but looked at HIP_HCC_FLAGS_Debug (which is an empty variable).

This PR fixes this bug by correctly capitalizing the build_configuration variable.

I've noticed that in the generated makefiles, we'd have 

if(NOT build_configuration)
    set(build_configuration Debug)
endif()

However, only definitions with all capitals are provided. 

e.g.

set(HIP_HCC_FLAGS_DEBUG -g)

This is because of lines 442 to 448. We capitalize the configuration ${config_upper}.

This PR fixes this bug.
@iotamudelta
Copy link
Contributor

Did you test that libcaffe2_hip.so has debug symbols after setting DEBUG=1 and recompiling?

@mangupta mangupta merged commit 5612683 into ROCm:master Aug 3, 2018
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.

None yet

3 participants