mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
[ROCm] fix test_allocator_backend (#166035)
Fixes #165872. Forward fix PR #165298. hipify was causing some symbols to be replaced. Pull Request resolved: https://github.com/pytorch/pytorch/pull/166035 Approved by: https://github.com/jeffdaily Co-authored-by: Jeff Daily <jeff.daily@amd.com>
This commit is contained in:
parent
0a93295da0
commit
2fde10d914
|
|
@ -4469,7 +4469,10 @@ struct BackendStaticInitializer {
|
|||
if (key == "backend") {
|
||||
tokenizer.checkToken(++i, ":");
|
||||
i++; // Move to the value after the colon
|
||||
if (tokenizer[i] == "cudaMallocAsync"
|
||||
// break up token to trick hipify
|
||||
if (tokenizer[i] ==
|
||||
"c"
|
||||
"udaMallocAsync"
|
||||
#ifdef USE_ROCM
|
||||
// convenience for ROCm users to allow either CUDA or HIP env var
|
||||
|| tokenizer[i] == "hipMallocAsync"
|
||||
|
|
|
|||
|
|
@ -913,7 +913,9 @@ struct CudaMallocAsyncAllocator : public CUDAAllocator {
|
|||
}
|
||||
}
|
||||
std::string name() override {
|
||||
return "cudaMallocAsync";
|
||||
// break up token to trick hipify
|
||||
return "c"
|
||||
"udaMallocAsync";
|
||||
}
|
||||
void copy_data(void* dest, const void* src, std::size_t count) const final {
|
||||
C10_CUDA_CHECK(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user