Make HIPStream also masquerade as CUDA. (#17469)
authorEdward Yang <ezyang@fb.com>
Thu, 28 Feb 2019 21:32:22 +0000 (13:32 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 28 Feb 2019 21:46:11 +0000 (13:46 -0800)
commitc9989dfe37d41dec334b22719b5efc2dfaaf671e
treede4eb7e4da69052902379df4bfb6a581e4c27f6f
parente157a6432fe06e019ebcbea590ed6c4e6363619c
Make HIPStream also masquerade as CUDA. (#17469)

Summary:
HIPGuard interfaces that interacted with HIPStream were previously
totally busted (because the streams had the wrong device type).
This fixes it, following along the same lines of MasqueardingAsCUDA.

Along the way I beefed up the explanatory comment.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
cc jithunnair-amd iotamudelta bddppq
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17469

Differential Revision: D14243396

Pulled By: ezyang

fbshipit-source-id: 972455753a62f8584ba9ab194f9c785db7bb9bde
aten/src/ATen/hip/impl/HIPGuardImplMasqueradingAsCUDA.h
aten/src/ATen/hip/impl/HIPStreamMasqueradingAsCUDA.h [new file with mode: 0644]
tools/amd_build/pyHIPIFY/cuda_to_hip_mappings.py