maybe_cast() — pytorch Function Reference
Architecture documentation for the maybe_cast() function in common.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD da0c865a_ac14_7a10_8fc5_8a3b7509426d["maybe_cast()"] 79f63331_206c_51dc_bfd1_4fd84b939754["check_accuracy()"] 79f63331_206c_51dc_bfd1_4fd84b939754 -->|calls| da0c865a_ac14_7a10_8fc5_8a3b7509426d 0f41377a_e71d_fd3c_1974_a0ef9ec1158e["check_tolerance()"] 0f41377a_e71d_fd3c_1974_a0ef9ec1158e -->|calls| da0c865a_ac14_7a10_8fc5_8a3b7509426d c52cc8f1_b576_9d50_98d9_34f721215c0e["run_performance_test_non_alternate()"] c52cc8f1_b576_9d50_98d9_34f721215c0e -->|calls| da0c865a_ac14_7a10_8fc5_8a3b7509426d d162fe35_2cc5_7738_ed94_76ad697846ef["run_performance_test()"] d162fe35_2cc5_7738_ed94_76ad697846ef -->|calls| da0c865a_ac14_7a10_8fc5_8a3b7509426d da8c81f0_c44b_4b89_914d_318c84a98a42["cast_based_on_args()"] da0c865a_ac14_7a10_8fc5_8a3b7509426d -->|calls| da8c81f0_c44b_4b89_914d_318c84a98a42 style da0c865a_ac14_7a10_8fc5_8a3b7509426d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/common.py lines 2039–2041
def maybe_cast(self, model, example_inputs):
model, example_inputs = self.cast_based_on_args(model, example_inputs)
return model, example_inputs
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does maybe_cast() do?
maybe_cast() is a function in the pytorch codebase.
What does maybe_cast() call?
maybe_cast() calls 1 function(s): cast_based_on_args.
What calls maybe_cast()?
maybe_cast() is called by 4 function(s): check_accuracy, check_tolerance, run_performance_test, run_performance_test_non_alternate.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free