-
Notifications
You must be signed in to change notification settings - Fork 21.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ghstack-source-id: dc03d44a6151091a0911fe21a493b29b92d287cc Pull Request resolved: #47252
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <ATen/native/vulkan/ops/Common.h> | ||
#include <torch/library.h> | ||
|
||
namespace at { | ||
namespace native { | ||
namespace vulkan { | ||
namespace ops { | ||
namespace { | ||
|
||
Tensor view( | ||
const Tensor& self_arg, | ||
IntArrayRef shape) { | ||
|
||
return self_arg.cpu().view(shape).vulkan(); | ||
} | ||
|
||
#ifdef USE_VULKAN_API | ||
|
||
TORCH_LIBRARY_IMPL(aten, Vulkan, m) { | ||
m.impl("view", TORCH_FN(view)); | ||
} | ||
|
||
#endif /* USE_VULKAN_API */ | ||
|
||
} // namespace | ||
} // namespace ops | ||
} // namespace vulkan | ||
} // namespace native | ||
} // namespace at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters