def METHOD_NAME(pytorch_inference, ec2_connection, region, gpu_only):
    _, framework_version = get_framework_and_version_from_tag(pytorch_inference)
    threshold = get_threshold_for_image(framework_version, PYTORCH_INFERENCE_GPU_THRESHOLD)
    ec2_performance_pytorch_inference(
        pytorch_inference,
        "gpu",
        ec2_connection,
        region,
        PT_PERFORMANCE_INFERENCE_GPU_CMD,
        threshold,
    )