Skip to content

Conversation

r-barnes
Copy link
Contributor

Summary:
std::ceil returns a float which is cast to size_t by the max operation.

We convert to int64_t to suppress the warning while matching the type of newDims[0].

Since the types match, we don't need an explicit template type for max. This allows max to take int64_t as its values, matching the type of newCapacity.

Test Plan: Standard pre-commit test rig.

Reviewed By: malfet

Differential Revision: D24481684

Summary:
`std::ceil` returns a `float` which is cast to `size_t` by the `max` operation.

We convert to `int64_t` to suppress the warning while matching the type of `newDims[0]`.

Since the types match, we don't need an explicit template type for `max`. This allows `max` to take `int64_t` as its values, matching the type of `newCapacity`.

Test Plan: Standard pre-commit test rig.

Reviewed By: malfet

Differential Revision: D24481684

fbshipit-source-id: f8708ec1044dbc14ea091c9917b087cb79e97183
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D24481684

@dr-ci
Copy link

dr-ci bot commented Oct 23, 2020

💊 CI failures summary and remediations

As of commit 44ab386 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 1 time.

@codecov
Copy link

codecov bot commented Oct 23, 2020

Codecov Report

Merging #46771 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #46771      +/-   ##
==========================================
- Coverage   68.98%   68.98%   -0.01%     
==========================================
  Files         433      433              
  Lines       55919    55919              
==========================================
- Hits        38577    38576       -1     
- Misses      17342    17343       +1     

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in fa8cd06.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants