From 705c9d60aad888f2333559946035dc21f472b6c5 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Fri, 8 Apr 2016 02:15:46 -0500 Subject: [PATCH 1/4] Print peers in hipConfig. Also include peer APIs in vim hilighting. [ROCm/hip-tests commit: 3fbad4bca5695211b2e39327b3399bced663b7e0] --- .../samples/1_Utils/hipInfo/hipInfo.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp b/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp index 146d17e015..581194f624 100644 --- a/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp +++ b/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp @@ -120,8 +120,25 @@ void printDeviceProp (int deviceId) cout << setw(w1) << "arch.hasSurfaceFuncs: " << props.arch.hasSurfaceFuncs << endl; cout << setw(w1) << "arch.has3dGrid: " << props.arch.has3dGrid << endl; cout << setw(w1) << "arch.hasDynamicParallelism: " << props.arch.hasDynamicParallelism << endl; + + int deviceCnt; + hipGetDeviceCount(&deviceCnt); + cout << setw(w1) << "peers: "; + for (int i=0; i Date: Fri, 8 Apr 2016 02:17:29 -0500 Subject: [PATCH 2/4] Use HIP_PATH if set else use relative ../... [ROCm/hip-tests commit: ac798c2997a9bb51c675fa7a07d10ca84194f54b] --- projects/hip-tests/samples/0_Intro/bit_extract/Makefile | 2 +- projects/hip-tests/samples/0_Intro/square/Makefile | 2 +- projects/hip-tests/samples/1_Utils/hipBusBandwidth/Makefile | 2 +- projects/hip-tests/samples/1_Utils/hipDispatchLatency/Makefile | 2 +- projects/hip-tests/samples/1_Utils/hipInfo/Makefile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/hip-tests/samples/0_Intro/bit_extract/Makefile b/projects/hip-tests/samples/0_Intro/bit_extract/Makefile index 39fb5cf8c6..cdf793363b 100644 --- a/projects/hip-tests/samples/0_Intro/bit_extract/Makefile +++ b/projects/hip-tests/samples/0_Intro/bit_extract/Makefile @@ -1,6 +1,6 @@ #Dependencies : [MYHIP]/bin must be in user's path. -HIP_PATH=../../.. +HIP_PATH=?../../.. HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --platform) HIPCC=$(HIP_PATH)/bin/hipcc diff --git a/projects/hip-tests/samples/0_Intro/square/Makefile b/projects/hip-tests/samples/0_Intro/square/Makefile index 98ee0be4f6..817c556b26 100644 --- a/projects/hip-tests/samples/0_Intro/square/Makefile +++ b/projects/hip-tests/samples/0_Intro/square/Makefile @@ -1,4 +1,4 @@ -HIP_PATH=../../.. +HIP_PATH?=../../.. HIPCC=$(HIP_PATH)/bin/hipcc all: square.hip.out diff --git a/projects/hip-tests/samples/1_Utils/hipBusBandwidth/Makefile b/projects/hip-tests/samples/1_Utils/hipBusBandwidth/Makefile index a713379d8d..4599cacba2 100644 --- a/projects/hip-tests/samples/1_Utils/hipBusBandwidth/Makefile +++ b/projects/hip-tests/samples/1_Utils/hipBusBandwidth/Makefile @@ -1,4 +1,4 @@ -HIP_PATH=../../.. +HIP_PATH?=../../.. HIPCC=$(HIP_PATH)/bin/hipcc EXE=hipBusBandwidth diff --git a/projects/hip-tests/samples/1_Utils/hipDispatchLatency/Makefile b/projects/hip-tests/samples/1_Utils/hipDispatchLatency/Makefile index 9b2d558114..87e707923d 100644 --- a/projects/hip-tests/samples/1_Utils/hipDispatchLatency/Makefile +++ b/projects/hip-tests/samples/1_Utils/hipDispatchLatency/Makefile @@ -1,4 +1,4 @@ -HIP_PATH=../../.. +HIP_PATH?=../../.. HIPCC=$(HIP_PATH)/bin/hipcc EXE=hipDispatchLatency diff --git a/projects/hip-tests/samples/1_Utils/hipInfo/Makefile b/projects/hip-tests/samples/1_Utils/hipInfo/Makefile index f38f157bcb..d69067388e 100644 --- a/projects/hip-tests/samples/1_Utils/hipInfo/Makefile +++ b/projects/hip-tests/samples/1_Utils/hipInfo/Makefile @@ -1,4 +1,4 @@ -HIP_PATH=../../.. +HIP_PATH?=../../.. HIPCC=$(HIP_PATH)/bin/hipcc EXE=hipInfo From 10d94490dc834539bb22bbf4be3fc57d3cdf4e0e Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Sat, 9 Apr 2016 04:35:06 -0500 Subject: [PATCH 3/4] Remove stray debug msgs, hipInfo don't print self as peer. [ROCm/hip-tests commit: c37a4c3d04d7fa0ae60692e8c7ad11e8a7edf486] --- projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp b/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp index 581194f624..9151d5058e 100644 --- a/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp +++ b/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp @@ -127,7 +127,7 @@ void printDeviceProp (int deviceId) for (int i=0; i Date: Mon, 11 Apr 2016 12:52:18 -0500 Subject: [PATCH 4/4] P2p checkpoint. - set USE_PEER_TO_PEER=3 (requires HCC "am_memtracker_update_peers") - when enabling peer, turn it on for previously allocated memory. - hipDeviceCanAccessPeer is no longer self-ware (self does not qualify as a peer) - device peerlist always includes self, so when we call allow_access we never remove self access. - hipDeviceReset() removes old peer mappings. [ROCm/hip-tests commit: b42167f80c74158023df17a795a716164444e831] --- projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp b/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp index 9151d5058e..581194f624 100644 --- a/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp +++ b/projects/hip-tests/samples/1_Utils/hipInfo/hipInfo.cpp @@ -127,7 +127,7 @@ void printDeviceProp (int deviceId) for (int i=0; i