mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix some variable types (#60414)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/60414 Test Plan: Sandcastle Reviewed By: ngimel Differential Revision: D29221183 fbshipit-source-id: f855efca2fd08844de65d0f9ef73bcceffee657e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7d779f84a3
commit
36d4062a62
@ -24,10 +24,8 @@ struct Indexer {
|
||||
, indexer_strides(indexer_strides)
|
||||
, original_strides(original_strides.data())
|
||||
, original_sizes(original_sizes.data()) {
|
||||
// NOLINTNEXTLINE(clang-diagnostic-sign-compare)
|
||||
AT_ASSERT(original_strides.size() == num_indexers);
|
||||
// NOLINTNEXTLINE(clang-diagnostic-sign-compare)
|
||||
AT_ASSERT(original_sizes.size() == num_indexers);
|
||||
AT_ASSERT(static_cast<int64_t>(original_strides.size()) == num_indexers);
|
||||
AT_ASSERT(static_cast<int64_t>(original_sizes.size()) == num_indexers);
|
||||
}
|
||||
|
||||
int64_t num_indexers;
|
||||
|
@ -474,8 +474,9 @@ struct Lexer {
|
||||
break;
|
||||
case TK_WHITESPACE:
|
||||
case TK_WHITESPACE_EOF: {
|
||||
const auto depth =
|
||||
r.kind == TK_WHITESPACE_EOF ? indent_stack.front() : r.range.size();
|
||||
const auto depth = static_cast<int64_t>(
|
||||
r.kind == TK_WHITESPACE_EOF ? indent_stack.front()
|
||||
: r.range.size());
|
||||
// note: TK_WHITESPACE_EOF is whitespace right before the EOF token
|
||||
// just like we allow the code to be indented to a particular initial
|
||||
// indent level, we allow the final indent to be anything and set
|
||||
|
Reference in New Issue
Block a user