Fixes for P2P and hipDeviceReset

- devicereset would lose track of default stream and thus subsequent
  synchronization calls might not actually sychronize.
- Also deviceReset now correctly frees streams.
- fix waits in P2P staging copy - first phase (Device0-to-Staging) must
  wait for second phase (Staging to Device1) to finish draining the
  buffer.
This commit is contained in:
Ben Sander
2016-04-18 20:49:33 -05:00
parent 8ec1aad95d
commit e020d68309
6 changed files with 45 additions and 33 deletions
+5 -1
View File
@@ -530,12 +530,16 @@ public:
bool removePeer(ihipDevice_t *peer);
void resetPeers(ihipDevice_t *thisDevice);
void addStream(ihipStream_t *stream);
uint32_t peerCnt() const { return _peerCnt; };
hsa_agent_t *peerAgents() const { return _peerAgents; };
private:
std::list<ihipStream_t*> _streams; // streams associated with this device.
//std::list< std::shared_ptr<ihipStream_t> > _streams; // streams associated with this device. TODO - convert to shared_ptr.
std::list< ihipStream_t* > _streams; // streams associated with this device.
ihipStream_t::SeqNum_t _stream_id;
// These reflect the currently Enabled set of peers for this GPU: