Skip to content

Commit

Permalink
[pytorch][vulkan] Fix downcast warnings-errors, aten_vulkan buck target
Browse files Browse the repository at this point in the history
Summary:
buck build has -Wall for downcasts - need to add safe_downcast<int32_t> everywhere

BUCK build changes for aten_vulkan to include vulkan_wrapper lib

Test Plan: The next diff with segmentation demo works fine

Reviewed By: dreiss

Differential Revision: D23739445

fbshipit-source-id: b22a30e1493c4174c35075a68586defb0fccd2af
  • Loading branch information
IvanKobzarev authored and facebook-github-bot committed Sep 17, 2020
1 parent b61d3d8 commit fdeee74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aten/src/ATen/native/vulkan/VulkanOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,12 +853,12 @@ void conv2d_depthwise(
}

ImageSizes conv2d_prepack_weights_image_sizes(
int64_t _OC,
int64_t _C,
int64_t argOC,
int64_t argC,
int64_t KH,
int64_t KW) {
const int32_t C = safe_downcast<int32_t>(_C);
const int32_t OC = safe_downcast<int32_t>(_OC);
const int32_t C = safe_downcast<int32_t>(argC);
const int32_t OC = safe_downcast<int32_t>(argOC);
const int32_t Cup4 = ALIGN_UP4(C);
const int32_t OC_4 = UP_DIV(OC, 4);
const int32_t Z = safe_downcast<int32_t>(KH) * safe_downcast<int32_t>(KW);
Expand Down

0 comments on commit fdeee74

Please sign in to comment.