pytorch / glow

Compiler for Neural Network hardware accelerators
Apache License 2.0
3.23k stars 691 forks source link

Habana CompiledFunction should be stateless #2905

Closed gcatron closed 5 years ago

gcatron commented 5 years ago

With the addition of DeviceBindings to the ExecutionContext the Habana compiledFunction should be refactored to be stateless. This way the same compiledFunction can be run on multiple cards. Once this is done we can close #1951 .

bertmaher commented 5 years ago

What state needs to be removed, exactly? There's ctx_ (which is unused), but the rest is not mutated during execute()

bertmaher commented 5 years ago

Double checking, HabanaFunction is good to go. It doesn't contain any device-specific or mutable state.