Skip to content

Commit

Permalink
Add LIBDIRS in Makefile for AMDGPU-PRO (Ubuntu and SLES/OpenSUSE). Fi…
Browse files Browse the repository at this point in the history
…xed parsing GPU load.
  • Loading branch information
matszpk committed May 26, 2017
1 parent 8414217 commit 071acae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ CXX = g++
CXXFLAGS = -Wall -O3 -std=c++11
LDFLAGS = -Wall -O3 -std=c++11
INCDIRS = -I$(ADLSDKDIR)/include
LIBDIRS =
# for AMDGPU-PRO SLES/OpenSUSE
#LIBDIRS = -L/opt/amdgpu-pro/lib64
# for AMDGPU-PRO Ubuntu
#LIBDIRS = -L/opt/amdgpu-pro/lib/x86_64-linux-gnu
LIBDIRS =
LIBS = -ldl -lpci -lm -lOpenCL -pthread

.PHONY: all clean
Expand Down
3 changes: 2 additions & 1 deletion amdcovc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,8 @@ AMDGPUAdapterInfo AMDGPUAdapterHandle::parseAdapterInfo(int index)
{
std::string line;
std::getline(ifs, line);
if (line.compare(0, 10, "GPU load: ")==0)
if (line.compare(0, 10, "GPU load: ")==0 ||
line.compare(0, 10, "GPU Load: ")==0)
{
errno = 0;
char* endp;
Expand Down

0 comments on commit 071acae

Please sign in to comment.