Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/torchcodec/_core/DeviceInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ struct DeviceInterfaceKey {

explicit DeviceInterfaceKey(torch::DeviceType type) : deviceType(type) {}

DeviceInterfaceKey(torch::DeviceType type, const std::string_view& var)
: deviceType(type), variant(var) {}
DeviceInterfaceKey(torch::DeviceType type, const std::string_view& variant)
: deviceType(type), variant(variant) {}
Comment on lines +35 to +36
Copy link
Contributor Author

@NicolasHug NicolasHug Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal linter is complaining that we're doing

DeviceInterfaceKey(torch::kCUDA, /*variant=*/"beta"),

and that our /*variant=*/ comment doesn't match the name of the parameter which is var.

I'm choosing to change the parameter name to from var to variant, instead of updating the comment: we use "variant" everywhere. "var" was only used for the initialization list not to look like variant(variant), which ... it does now. 🤷‍♂️

};

class DeviceInterface {
Expand Down
Loading