Skip to content

Commit 0e3a684

Browse files
committed
refactor: naming cleanup
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 6cee04d commit 0e3a684

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

core/conversion/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cc_library(
1414
],
1515
srcs = [
1616
"conversion.cpp",
17-
"conversion_blacklist.cpp",
17+
"conversion_ignorelist.cpp",
1818
"InterfaceTypes.cpp"
1919
],
2020
deps = [

core/conversion/conversion.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace trtorch {
1111
namespace core {
1212
namespace conversion {
1313

14-
// Defined in core/conversion/conversion_blacklist.cpp
15-
bool isNodeConversionBlacklisted(const torch::jit::Node* n);
14+
// Defined in core/conversion/conversion_ignorelist.cpp
15+
bool isNodeConversionIgnored(const torch::jit::Node* n);
1616

1717
bool OpSupported(const torch::jit::Node* n) {
1818
return evaluators::shouldEvalAtConversionTime(n) || converters::node_is_convertable(n);
@@ -302,7 +302,7 @@ void ConvertBlockToNetDef(ConversionCtx* ctx, const torch::jit::Block* b, Conver
302302

303303
for (const auto n : nodes) {
304304
bool to_eval = evaluators::shouldEvalAtConversionTime(n);
305-
bool blacklisted = isNodeConversionBlacklisted(n);
305+
bool ignored = isNodeConversionIgnored(n);
306306
if (n->kind() == torch::jit::prim::Loop) {
307307
EvaluateLoopBlock(ctx, n);
308308
} else if (n->kind() == torch::jit::prim::If) {
@@ -317,16 +317,16 @@ void ConvertBlockToNetDef(ConversionCtx* ctx, const torch::jit::Block* b, Conver
317317
}
318318
ctx->AssociateValueAndIValue(n->output(0), eval.value());
319319
}
320-
} else if (!blacklisted) {
320+
} else if (!ignored) {
321321
// Should error out if something fails
322322
AddLayer(ctx, n);
323323
} else {
324324
std::string reason = "";
325325
if (to_eval) {
326326
reason += " (to be evaluated)";
327327
}
328-
if (blacklisted) {
329-
reason += " (explicitly blacklisted)";
328+
if (ignored) {
329+
reason += " (explicitly ignored)";
330330
}
331331
LOG_DEBUG(ctx->logger,
332332
"Skipping Node: " << util::node_info(n) << reason);

core/conversion/conversion_blacklist.cpp renamed to core/conversion/conversion_ignorelist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const std::unordered_set<std::string>& get_non_convertable_nodes() {
2828
return nonconvertable_nodes;
2929
}
3030

31-
bool isNodeConversionBlacklisted(const torch::jit::Node* n) {
31+
bool isNodeConversionIgnored(const torch::jit::Node* n) {
3232
auto kind = n->kind();
3333
auto convertableIt = get_non_convertable_nodes().find(kind.toQualString());
3434
if (convertableIt == get_non_convertable_nodes().end()) {

0 commit comments

Comments
 (0)