Skip to content

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

Merged
mangupta merged 1 commit intoROCm:masterfrom
Jorghi12:patch-10
Aug 3, 2018
Merged

Fixing a HIP bug that causes DEBUG symbols to be dropped.#588
mangupta merged 1 commit intoROCm:masterfrom
Jorghi12:patch-10

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.

3 participants