Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Paper available at https://doi.org/10.1038/s43856-022-00186-5
TIA Toolbox 1.6.0 Documentation
TIA Toolbox 1.6.0 Documentation
  • Readme
  • Installation
  • Pre-trained Models
  • Usage Examples
    • Basic Functionalities
      • Read and Visualize a WSI
      • Stain Normalization
      • Masking tissue region in whole slide images
      • Saving tissue thumbail and mask
      • Patch extraction from Histology Images
      • Patch Prediction Models
      • Semantic Segmentation Models
      • Advanced Model Handling in TIAToolbox
      • Nucleus Instance Segmentation
      • Multi-Task Segmentation Models
      • Whole Slide Image Registration
      • Using Foundation Models in TIAToolbox
    • Pipelines
      • Prediction of Molecular Pathways and Key Mutations
      • Slide Graph Pipeline
      • Slide Graph Full-pipeline Notebook
  • Algorithms
    • IDaRS Theory
  • Visualization
  • API Reference
    • read_registry_files
    • DuplicateFilter
    • annotation
      • dsl
        • json_contains
        • json_list_sum
        • py_is_none
        • py_is_not_none
        • py_regexp
        • sql_has_key
        • sql_is_none
        • sql_is_not_none
        • sql_list_sum
        • COMMON_GLOBALS_Type
        • SQLExpression
        • SQLJSONDictionary
        • SQLNone
        • SQLRegex
        • SQLTriplet
      • storage
        • Annotation
        • AnnotationStore
        • DictionaryStore
        • SQLiteMetadata
        • SQLiteStore
    • cli
      • version_msg
      • common
        • add_default_to_usage_help
        • cli_auto_generate_mask
        • cli_batch_size
        • cli_device
        • cli_file_type
        • cli_img_input
        • cli_masks
        • cli_merge_predictions
        • cli_method
        • cli_mode
        • cli_name
        • cli_num_loader_workers
        • cli_num_postproc_workers
        • cli_output_path
        • cli_pretrained_model
        • cli_pretrained_weights
        • cli_region
        • cli_resolution
        • cli_return_labels
        • cli_return_probabilities
        • cli_tile_format
        • cli_tile_objective
        • cli_tile_read_size
        • cli_units
        • cli_verbose
        • cli_yaml_config_path
        • no_input_message
        • prepare_file_dir_cli
        • prepare_ioconfig_seg
        • prepare_model_cli
        • TIAToolboxCLI
      • nucleus_instance_segment
      • patch_predictor
      • read_bounds
      • save_tiles
      • semantic_segment
      • show_wsi
      • slide_info
      • slide_thumbnail
      • stain_norm
      • tissue_mask
      • visualize
    • data
      • small_svs
      • stain_norm_target
    • enums
      • GeometryType
    • models
      • architecture
        • fetch_pretrained_weights
        • get_pretrained_model
        • hovernet
          • DenseBlock
          • HoVerNet
          • ResidualBlock
          • TFSamepaddingLayer
        • hovernetplus
          • HoVerNetPlus
        • idars
          • IDaRS
        • mapde
          • MapDe
        • micronet
          • group1_arch_branch
          • group1_forward_branch
          • group2_arch_branch
          • group2_forward_branch
          • group3_arch_branch
          • group3_forward_branch
          • group4_arch_branch
          • group4_forward_branch
          • out_arch_branch
          • MicroNet
        • nuclick
          • ConvBnRelu
          • MultiscaleConvBlock
          • NuClick
          • ResidualConv
        • sccnn
          • SCCNN
        • unet
          • create_block
          • ResNetEncoder
          • UNetModel
          • UnetEncoder
        • utils
          • centre_crop
          • centre_crop_to_shape
          • compile_model
          • is_torch_compile_compatible
          • UpSample2x
        • vanilla
          • CNNBackbone
          • CNNModel
          • TimmBackbone
          • TimmModel
      • dataset
        • classification
          • predefined_preproc_func
          • PatchDataset
          • WSIPatchDataset
        • dataset_abc
          • PatchDatasetABC
        • info
          • DatasetInfoABC
          • KatherPatchDataset
      • engine
        • multi_task_segmentor
          • MultiTaskSegmentor
        • nucleus_instance_segmentor
          • NucleusInstanceSegmentor
        • patch_predictor
          • IOPatchPredictorConfig
          • PatchPredictor
        • semantic_segmentor
          • DeepFeatureExtractor
          • IOSegmentorConfig
          • SemanticSegmentor
          • WSIStreamDataset
      • models_abc
        • model_to
        • IOConfigABC
        • ModelABC
    • tiatoolbox
    • tools
      • graph
        • affinity_to_edge_index
        • delaunay_adjacency
        • edge_index_to_triangles
        • triangle_signed_area
        • SlideGraphConstructor
      • patchextraction
        • get_patch_extractor
        • validate_shape
        • ExtractorParams
        • PatchExtractor
        • PatchExtractorABC
        • PointsPatchExtractor
        • PointsPatchExtractorParams
        • SlidingWindowPatchExtractor
        • SlidingWindowPatchExtractorParams
      • pyramid
        • AnnotationTileGenerator
        • TilePyramidGenerator
        • ZoomifyGenerator
      • registration
        • wsi_registration
          • apply_affine_transformation
          • apply_bspline_transform
          • compute_center_of_mass
          • estimate_bspline_transform
          • match_histograms
          • prealignment
          • AffineWSITransformer
          • DFBRFeatureExtractor
          • DFBRegister
      • stainaugment
        • StainAugmentor
      • stainextract
        • dl_output_for_h_and_e
        • h_and_e_in_right_order
        • vectors_in_correct_direction
        • CustomExtractor
        • MacenkoExtractor
        • RuifrokExtractor
        • VahadaneExtractor
      • stainnorm
        • get_normalizer
        • CustomNormalizer
        • MacenkoNormalizer
        • ReinhardNormalizer
        • RuifrokNormalizer
        • StainNormalizer
        • VahadaneNormalizer
      • tissuemask
        • MorphologicalMasker
        • OtsuTissueMasker
        • TissueMasker
    • type_hints
    • utils
      • env_detection
        • check_pixman_using_anaconda
        • check_pixman_using_brew
        • check_pixman_using_dpkg
        • check_pixman_using_macports
        • colab_has_gpu
        • has_gpu
        • has_network
        • in_conda_env
        • is_interactive
        • is_notebook
        • pixman_versions
        • pixman_warning
        • running_on_ci
        • running_on_circleci
        • running_on_colab
        • running_on_github
        • running_on_kaggle
        • running_on_travis
        • version_to_tuple
      • exceptions
        • tiatoolbox.utils.exceptions.FileNotSupportedError
        • tiatoolbox.utils.exceptions.MethodNotSupportedError
      • image
        • tiatoolbox.utils.image.PADDING_TO_BOUNDS
        • crop_and_pad_edges
        • find_overlap
        • find_padding
        • make_bounds_size_positive
        • normalize_padding_size
        • safe_padded_read
        • sub_pixel_read
      • magic
        • is_dcm
        • is_dir
        • is_sqlite3
        • is_zip
      • metrics
        • dice
        • f1_detection
        • pair_coordinates
      • misc
        • add_from_dat
        • anns_from_hoverdict
        • assert_dtype_int
        • contrast_enhancer
        • dict_to_store
        • dict_to_store_semantic_segmentor
        • dict_to_zarr
        • download_data
        • get_bounding_box
        • get_luminosity_tissue_mask
        • grab_files_from_dir
        • imread
        • imwrite
        • load_stain_matrix
        • make_default_dict
        • make_valid_poly
        • parse_cv2_interpolaton
        • ppu2mpp
        • process_contours
        • read_locations
        • save_as_json
        • save_yaml
        • select_cv2_interpolation
        • select_device
        • split_path_name_ext
        • store_from_dat
        • string_to_tuple
        • unzip_data
        • write_probability_heatmap_as_ome_tiff
      • tiff_to_fsspec
        • convert_metadata
        • main
        • replace_url
      • transforms
        • background_composite
        • bounds2locsize
        • bounds2slices
        • imresize
        • locsize2bounds
        • od2rgb
        • pad_bounds
        • rgb2od
      • visualization
        • colourise_image
        • overlay_prediction_contours
        • overlay_prediction_mask
        • overlay_probability_map
        • plot_graph
        • random_colors
        • AnnotationRenderer
        • ColorbarParamsDict
    • visualization
      • bokeh_app
        • app_hooks
          • on_session_destroyed
        • main
          • add_layer
          • bind_cb_obj
          • bind_cb_obj_tog
          • blur_spinner_cb
          • build_predicate
          • change_tiles
          • cmap_select_cb
          • color_input_cb
          • control_tabs_cb
          • control_tabs_remove_cb
          • cprop_input_cb
          • edge_size_cb
          • filter_input_cb
          • fixed_layer_select_cb
          • format_info
          • gather_ui_elements
          • get_from_config
          • get_mapper_for_prop
          • get_view_bounds
          • handle_graph_layer
          • hex2rgb
          • initialise_overlay
          • initialise_slide
          • layer_drop_cb
          • layer_select_cb
          • layer_slider_cb
          • make_color_dict
          • make_color_seq_from_cmap
          • make_safe_name
          • make_ts
          • make_window
          • model_drop_cb
          • name2type
          • node_select_cb
          • opt_buttons_cb
          • overlay_alpha_cb
          • overlay_toggle_cb
          • populate_layer_list
          • populate_slide_list
          • pt_size_cb
          • res_switch_cb
          • rgb2hex
          • save_cb
          • scale_spinner_cb
          • segment_on_box
          • set_alpha_glyph
          • setup_config_ui_settings
          • slide_alpha_cb
          • slide_select_cb
          • slide_toggle_cb
          • tap_event_cb
          • to_float_rgb
          • to_int_rgb
          • to_model_cb
          • to_num
          • type_cmap_cb
          • update
          • update_mapper
          • update_renderer
          • update_ui_on_new_annotations
          • ColorCycler
          • DocConfig
          • DummyAttr
          • TileGroup
          • UIWrapper
          • ViewerState
      • tileserver
        • TileServer
      • ui_utils
        • get_level_by_extent
    • wsicore
      • metadata
        • ngff
          • Axis
          • Channel
          • CoordinateTransform
          • Creator
          • Dataset
          • Multiscales
          • Omero
          • RDefs
          • Window
          • Zattrs
      • wsimeta
        • WSIMeta
      • wsireader
        • is_dicom
        • is_ngff
        • is_tiled_tiff
        • is_zarr
        • AnnotationStoreReader
        • ArrayView
        • DICOMWSIReader
        • FsspecJsonWSIReader
        • JP2WSIReader
        • NGFFWSIReader
        • OpenSlideWSIReader
        • TIFFWSIReader
        • TIFFWSIReaderDelegate
        • VirtualWSIReader
        • WSIReader
  • Contributing
  • Authors
  • History
Back to top

is_torch_compile_compatible¶

tiatoolbox . models . architecture . utils . is_torch_compile_compatible

is_torch_compile_compatible()[source]¶

Check if the current GPU is compatible with torch-compile.

Returns:

True if current GPU is compatible with torch-compile, False otherwise.

Raises:

Warning if GPU is not compatible with torch.compile. –

Return type:

bool

Next
UpSample2x
Previous
compile_model
Copyright © 2025, TIA Lab
Made with Sphinx and @pradyunsg's Furo
On this page
  • is_torch_compile_compatible
    • is_torch_compile_compatible()