class_docstr: The CachedWheelsCommand plugs into the default bdist wheel, which is ran by pip when it cannot
  find an existing wheel (which is currently the case for all flash attention installs). We use
  the environment parameters to detect whether there is already a pre-built version of a compatible
  wheel available and short-circuits the standard full build pipeline.
class_docstr_tok: ["The","CachedWheelsCommand","plugs","into","the","default","bdist","wheel",",","which","is","ran","by","pip","when","it","can","not","find","an","existing","wheel","(","which","is","currently","the","case","for","all","flash","attention","installs",")",".","We","use","the","environment","parameters","to","detect","whether","there","is","already","a","pre-built","version","of","a","compatible","wheel","available","and","short-circuits","the","standard","full","build","pipeline","."]
code: def run(self):
      if FORCE_BUILD:
          return super().run()
  
      wheel_url, wheel_filename = get_wheel_url()
      print("Guessing wheel URL: ", wheel_url)
      try:
          urllib.request.urlretrieve(wheel_url, wheel_filename)
  
          # Make the archive
          # Lifted from the root wheel processing command
          # https://github.com/pypa/wheel/blob/cf71108ff9f6ffc36978069acb28824b44ae028e/src/wheel/bdist_wheel.py#LL381C9-L381C85
          if not os.path.exists(self.dist_dir):
              os.makedirs(self.dist_dir)
  
          impl_tag, abi_tag, plat_tag = self.get_tag()
          archive_basename = (
              f"{self.wheel_dist_name}-{impl_tag}-{abi_tag}-{plat_tag}"
          )
  
          wheel_path = os.path.join(
              self.dist_dir, archive_basename + ".whl"
          )
          print("Raw wheel path", wheel_path)
          os.rename(wheel_filename, wheel_path)
      except urllib.error.HTTPError:
          print("Precompiled wheel not found. Building from source...")
          # If the wheel could not be downloaded, build from source
          super().run()
  
imports: import sys
  import warnings
  import os
  import re
  import ast
  from pathlib import Path
  from packaging.version import parse, Version
  import platform
  from setuptools import setup, find_packages
  import subprocess
  import urllib.request
  import urllib.error
  from wheel.bdist_wheel import bdist_wheel
  import torch
  from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension, CUDA_HOME
label_desc: Use image node_id 1 for calling the CachedWheelsCommand obj's underlying member method code with example usage: obj.run() and returns: super