Skip to content

Instantly share code, notes, and snippets.

@ivirshup
Created July 6, 2021 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivirshup/48321b8c2282748f874597f7f649d475 to your computer and use it in GitHub Desktop.
Save ivirshup/48321b8c2282748f874597f7f649d475 to your computer and use it in GitHub Desktop.
pynndescent 0.5.3 traceback
This file has been truncated, but you can view the full file.
2021-07-06T06:22:38.2855413Z ##[section]Starting: PyTest
2021-07-06T06:22:38.2865170Z ==============================================================================
2021-07-06T06:22:38.2865487Z Task : Command line
2021-07-06T06:22:38.2866717Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2021-07-06T06:22:38.2867060Z Version : 2.182.0
2021-07-06T06:22:38.2867287Z Author : Microsoft Corporation
2021-07-06T06:22:38.2867638Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2021-07-06T06:22:38.2868015Z ==============================================================================
2021-07-06T06:22:39.2961314Z Generating script.
2021-07-06T06:22:39.2962626Z Script contents:
2021-07-06T06:22:39.2963181Z pytest --color=yes -vv --ignore=scanpy/tests/_images
2021-07-06T06:22:39.2963596Z ========================== Starting Command Output ===========================
2021-07-06T06:22:39.2969626Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/b25dde67-39d8-42f0-bee3-c1e8955b93b7.sh
2021-07-06T06:22:39.2970452Z ============================= test session starts ==============================
2021-07-06T06:22:39.2971524Z platform linux -- Python 3.7.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /opt/hostedtoolcache/Python/3.7.10/x64/bin/python
2021-07-06T06:22:39.2972413Z cachedir: .pytest_cache
2021-07-06T06:22:39.2972804Z rootdir: /home/vsts/work/1/s, configfile: pyproject.toml, testpaths: scanpy/tests/
2021-07-06T06:22:39.2973378Z plugins: nunit-0.6.0, cov-2.12.1
2021-07-06T06:23:05.3033926Z collecting ... collected 738 items / 5 skipped / 733 selected
2021-07-06T06:23:05.3034476Z
2021-07-06T06:23:05.3072570Z scanpy/tests/test_binary.py::test_builtin_settings PASSED [ 0%]
2021-07-06T06:23:05.3161688Z scanpy/tests/test_binary.py::test_help_displayed[args0] PASSED [ 0%]
2021-07-06T06:23:05.3236124Z scanpy/tests/test_binary.py::test_help_displayed[args1] PASSED [ 0%]
2021-07-06T06:23:05.3318308Z scanpy/tests/test_binary.py::test_help_output PASSED [ 0%]
2021-07-06T06:23:05.3735651Z scanpy/tests/test_binary.py::test_external PASSED [ 0%]
2021-07-06T06:23:05.3824018Z scanpy/tests/test_binary.py::test_error_wrong_command PASSED [ 0%]
2021-07-06T06:23:05.4956274Z scanpy/tests/test_clustering.py::test_leiden_basic PASSED [ 0%]
2021-07-06T06:23:05.7027732Z scanpy/tests/test_clustering.py::test_clustering_subset[louvain-louvain] PASSED [ 1%]
2021-07-06T06:23:05.9399023Z scanpy/tests/test_clustering.py::test_clustering_subset[leiden-leiden] PASSED [ 1%]
2021-07-06T06:23:06.1076769Z scanpy/tests/test_clustering.py::test_louvain_basic PASSED [ 1%]
2021-07-06T06:23:06.2458265Z scanpy/tests/test_clustering.py::test_partition_type PASSED [ 1%]
2021-07-06T06:23:06.3040223Z scanpy/tests/test_combat.py::test_norm PASSED [ 1%]
2021-07-06T06:23:06.4429345Z scanpy/tests/test_combat.py::test_covariates PASSED [ 1%]
2021-07-06T06:23:06.5289639Z scanpy/tests/test_combat.py::test_combat_obs_names PASSED [ 1%]
2021-07-06T06:23:06.5938147Z scanpy/tests/test_combat.py::test_silhouette PASSED [ 2%]
2021-07-06T06:23:06.5953967Z scanpy/tests/test_datasets.py::test_burczynski06 SKIPPED (need --int...) [ 2%]
2021-07-06T06:23:06.5965967Z scanpy/tests/test_datasets.py::test_moignard15 SKIPPED (need --inter...) [ 2%]
2021-07-06T06:23:06.5980331Z scanpy/tests/test_datasets.py::test_paul15 SKIPPED (need --internet-...) [ 2%]
2021-07-06T06:23:06.5995304Z scanpy/tests/test_datasets.py::test_pbmc3k SKIPPED (need --internet-...) [ 2%]
2021-07-06T06:23:06.6007904Z scanpy/tests/test_datasets.py::test_pbmc3k_processed SKIPPED (need -...) [ 2%]
2021-07-06T06:23:06.6019566Z scanpy/tests/test_datasets.py::test_ebi_expression_atlas SKIPPED (ne...) [ 2%]
2021-07-06T06:23:06.6158465Z scanpy/tests/test_datasets.py::test_krumsiek11 PASSED [ 2%]
2021-07-06T06:23:06.6202976Z scanpy/tests/test_datasets.py::test_blobs PASSED [ 3%]
2021-07-06T06:23:06.6268438Z scanpy/tests/test_datasets.py::test_toggleswitch PASSED [ 3%]
2021-07-06T06:23:06.6995760Z scanpy/tests/test_datasets.py::test_pbmc68k_reduced PASSED [ 3%]
2021-07-06T06:23:06.7011365Z scanpy/tests/test_datasets.py::test_visium_datasets SKIPPED (need --...) [ 3%]
2021-07-06T06:23:06.8791516Z scanpy/tests/test_datasets.py::test_download_failure PASSED [ 3%]
2021-07-06T06:23:06.9527571Z scanpy/tests/test_dendrogram_key_added.py::test_dendrogram_key_added[None-bulk_labels] PASSED [ 3%]
2021-07-06T06:23:07.0300306Z scanpy/tests/test_dendrogram_key_added.py::test_dendrogram_key_added[None-groupby1] PASSED [ 3%]
2021-07-06T06:23:07.1078817Z scanpy/tests/test_dendrogram_key_added.py::test_dendrogram_key_added[custom_key-bulk_labels] PASSED [ 4%]
2021-07-06T06:23:07.1856053Z scanpy/tests/test_dendrogram_key_added.py::test_dendrogram_key_added[custom_key-groupby1] PASSED [ 4%]
2021-07-06T06:23:19.9170326Z scanpy/tests/test_deprecations.py::test_deprecate_multicore_tsne PASSED [ 4%]
2021-07-06T06:23:32.3000945Z scanpy/tests/test_embedding.py::test_tsne PASSED [ 4%]
2021-07-06T06:23:34.9191312Z scanpy/tests/test_embedding.py::test_tsne_metric_warning PASSED [ 4%]
2021-07-06T06:23:37.8077961Z scanpy/tests/test_embedding.py::test_umap_init_dtype PASSED [ 4%]
2021-07-06T06:23:37.8091599Z scanpy/tests/test_embedding.py::test_umap_init_paga[fa] SKIPPED (nee...) [ 4%]
2021-07-06T06:23:39.6475500Z scanpy/tests/test_embedding.py::test_umap_init_paga[fr] PASSED [ 5%]
2021-07-06T06:23:39.8287515Z scanpy/tests/test_embedding.py::test_diffmap PASSED [ 5%]
2021-07-06T06:23:39.8348199Z scanpy/tests/test_embedding_density.py::test_embedding_density PASSED [ 5%]
2021-07-06T06:23:40.0008681Z scanpy/tests/test_embedding_density.py::test_embedding_density_plot PASSED [ 5%]
2021-07-06T06:23:40.5797450Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.True-legend.on_data-groups.3] PASSED [ 5%]
2021-07-06T06:23:40.8305936Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.True-legend.on_data-groups.all] PASSED [ 5%]
2021-07-06T06:23:41.2704058Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.True-legend.on_right-groups.3] PASSED [ 5%]
2021-07-06T06:23:42.3677061Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.True-legend.on_right-groups.all] PASSED [ 5%]
2021-07-06T06:23:42.5898049Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.True-legend.off-groups.3] PASSED [ 6%]
2021-07-06T06:23:42.7889499Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.True-legend.off-groups.all] PASSED [ 6%]
2021-07-06T06:23:43.0120341Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.False-legend.on_data-groups.3] PASSED [ 6%]
2021-07-06T06:23:43.2653012Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.False-legend.on_data-groups.all] PASSED [ 6%]
2021-07-06T06:23:43.6446714Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.False-legend.on_right-groups.3] PASSED [ 6%]
2021-07-06T06:23:44.5355334Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.False-legend.on_right-groups.all] PASSED [ 6%]
2021-07-06T06:23:44.7461705Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.False-legend.off-groups.3] PASSED [ 6%]
2021-07-06T06:23:44.9479414Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.black_tup-na_in_legend.False-legend.off-groups.all] PASSED [ 7%]
2021-07-06T06:23:45.1802860Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.True-legend.on_data-groups.3] PASSED [ 7%]
2021-07-06T06:23:45.4421974Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.True-legend.on_data-groups.all] PASSED [ 7%]
2021-07-06T06:23:45.8901120Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.True-legend.on_right-groups.3] PASSED [ 7%]
2021-07-06T06:23:46.7823242Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.True-legend.on_right-groups.all] PASSED [ 7%]
2021-07-06T06:23:46.9884442Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.True-legend.off-groups.3] PASSED [ 7%]
2021-07-06T06:23:47.2013229Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.True-legend.off-groups.all] PASSED [ 7%]
2021-07-06T06:23:47.4284050Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.False-legend.on_data-groups.3] PASSED [ 7%]
2021-07-06T06:23:47.6781658Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.False-legend.on_data-groups.all] PASSED [ 8%]
2021-07-06T06:23:48.2447460Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.False-legend.on_right-groups.3] PASSED [ 8%]
2021-07-06T06:23:49.1296439Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.False-legend.on_right-groups.all] PASSED [ 8%]
2021-07-06T06:23:49.3286170Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.False-legend.off-groups.3] PASSED [ 8%]
2021-07-06T06:23:49.5080641Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[pca-na_color.default-na_in_legend.False-legend.off-groups.all] PASSED [ 8%]
2021-07-06T06:23:51.1409919Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.True-legend.on_data-groups.3] PASSED [ 8%]
2021-07-06T06:23:52.8242729Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.True-legend.on_data-groups.all] PASSED [ 8%]
2021-07-06T06:23:54.6963777Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.True-legend.on_right-groups.3] PASSED [ 9%]
2021-07-06T06:23:56.8400930Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.True-legend.on_right-groups.all] PASSED [ 9%]
2021-07-06T06:23:58.8067334Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.True-legend.off-groups.3] PASSED [ 9%]
2021-07-06T06:24:00.1898061Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.True-legend.off-groups.all] PASSED [ 9%]
2021-07-06T06:24:01.8646197Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.False-legend.on_data-groups.3] PASSED [ 9%]
2021-07-06T06:24:03.5453063Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.False-legend.on_data-groups.all] PASSED [ 9%]
2021-07-06T06:24:05.3242581Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.False-legend.on_right-groups.3] PASSED [ 9%]
2021-07-06T06:24:07.6102667Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.False-legend.on_right-groups.all] PASSED [ 10%]
2021-07-06T06:24:09.2267391Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.False-legend.off-groups.3] PASSED [ 10%]
2021-07-06T06:24:10.8088393Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.black_tup-na_in_legend.False-legend.off-groups.all] PASSED [ 10%]
2021-07-06T06:24:12.4506399Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.True-legend.on_data-groups.3] PASSED [ 10%]
2021-07-06T06:24:14.1334803Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.True-legend.on_data-groups.all] PASSED [ 10%]
2021-07-06T06:24:16.0620319Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.True-legend.on_right-groups.3] PASSED [ 10%]
2021-07-06T06:24:18.4257715Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.True-legend.on_right-groups.all] PASSED [ 10%]
2021-07-06T06:24:19.8953341Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.True-legend.off-groups.3] PASSED [ 10%]
2021-07-06T06:24:21.5228346Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.True-legend.off-groups.all] PASSED [ 11%]
2021-07-06T06:24:23.1374936Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.False-legend.on_data-groups.3] PASSED [ 11%]
2021-07-06T06:24:24.8003810Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.False-legend.on_data-groups.all] PASSED [ 11%]
2021-07-06T06:24:26.5732928Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.False-legend.on_right-groups.3] PASSED [ 11%]
2021-07-06T06:24:28.8660590Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.False-legend.on_right-groups.all] PASSED [ 11%]
2021-07-06T06:24:30.4749190Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.False-legend.off-groups.3] PASSED [ 11%]
2021-07-06T06:24:32.0994760Z scanpy/tests/test_embedding_plots.py::test_missing_values_categorical[spatial-na_color.default-na_in_legend.False-legend.off-groups.all] PASSED [ 11%]
2021-07-06T06:24:32.4129359Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_data-vbounds.default] PASSED [ 12%]
2021-07-06T06:24:32.7271240Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_data-vbounds.numbers] PASSED [ 12%]
2021-07-06T06:24:33.0724027Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_data-vbounds.percentile] PASSED [ 12%]
2021-07-06T06:24:33.3959358Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_data-vbounds.vcenter] PASSED [ 12%]
2021-07-06T06:24:33.7263988Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_data-vbounds.norm] PASSED [ 12%]
2021-07-06T06:24:34.0497766Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_right-vbounds.default] PASSED [ 12%]
2021-07-06T06:24:34.5626064Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_right-vbounds.numbers] PASSED [ 12%]
2021-07-06T06:24:34.9099138Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_right-vbounds.percentile] PASSED [ 13%]
2021-07-06T06:24:35.2257931Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_right-vbounds.vcenter] PASSED [ 13%]
2021-07-06T06:24:35.5449878Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.on_right-vbounds.norm] PASSED [ 13%]
2021-07-06T06:24:35.8630267Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.off-vbounds.default] PASSED [ 13%]
2021-07-06T06:24:36.1963671Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.off-vbounds.numbers] PASSED [ 13%]
2021-07-06T06:24:36.5379635Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.off-vbounds.percentile] PASSED [ 13%]
2021-07-06T06:24:36.8711753Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.off-vbounds.vcenter] PASSED [ 13%]
2021-07-06T06:24:37.1941031Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.black_tup-legend.off-vbounds.norm] PASSED [ 13%]
2021-07-06T06:24:37.5171601Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_data-vbounds.default] PASSED [ 14%]
2021-07-06T06:24:38.0485542Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_data-vbounds.numbers] PASSED [ 14%]
2021-07-06T06:24:38.4035682Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_data-vbounds.percentile] PASSED [ 14%]
2021-07-06T06:24:38.7171403Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_data-vbounds.vcenter] PASSED [ 14%]
2021-07-06T06:24:39.0521975Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_data-vbounds.norm] PASSED [ 14%]
2021-07-06T06:24:39.3652502Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_right-vbounds.default] PASSED [ 14%]
2021-07-06T06:24:39.6946386Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_right-vbounds.numbers] PASSED [ 14%]
2021-07-06T06:24:40.0325584Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_right-vbounds.percentile] PASSED [ 15%]
2021-07-06T06:24:40.3498967Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_right-vbounds.vcenter] PASSED [ 15%]
2021-07-06T06:24:40.6793702Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.on_right-vbounds.norm] PASSED [ 15%]
2021-07-06T06:24:41.1678228Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.off-vbounds.default] PASSED [ 15%]
2021-07-06T06:24:41.4753197Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.off-vbounds.numbers] PASSED [ 15%]
2021-07-06T06:24:41.8182447Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.off-vbounds.percentile] PASSED [ 15%]
2021-07-06T06:24:42.1366137Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.off-vbounds.vcenter] PASSED [ 15%]
2021-07-06T06:24:42.4600399Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[pca-na_color.default-legend.off-vbounds.norm] PASSED [ 15%]
2021-07-06T06:24:44.1701062Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_data-vbounds.default] PASSED [ 16%]
2021-07-06T06:24:45.9259395Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_data-vbounds.numbers] PASSED [ 16%]
2021-07-06T06:24:47.6797316Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_data-vbounds.percentile] PASSED [ 16%]
2021-07-06T06:24:49.3945637Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_data-vbounds.vcenter] PASSED [ 16%]
2021-07-06T06:24:51.1268745Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_data-vbounds.norm] PASSED [ 16%]
2021-07-06T06:24:52.8411580Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_right-vbounds.default] PASSED [ 16%]
2021-07-06T06:24:54.5995749Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_right-vbounds.numbers] PASSED [ 16%]
2021-07-06T06:24:56.4122887Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_right-vbounds.percentile] PASSED [ 17%]
2021-07-06T06:24:58.1723019Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_right-vbounds.vcenter] PASSED [ 17%]
2021-07-06T06:24:59.9124936Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.on_right-vbounds.norm] PASSED [ 17%]
2021-07-06T06:25:01.5166921Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.off-vbounds.default] PASSED [ 17%]
2021-07-06T06:25:03.3042597Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.off-vbounds.numbers] PASSED [ 17%]
2021-07-06T06:25:05.0941020Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.off-vbounds.percentile] PASSED [ 17%]
2021-07-06T06:25:06.8558915Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.off-vbounds.vcenter] PASSED [ 17%]
2021-07-06T06:25:08.6461276Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.black_tup-legend.off-vbounds.norm] PASSED [ 18%]
2021-07-06T06:25:10.4185321Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_data-vbounds.default] PASSED [ 18%]
2021-07-06T06:25:12.1931160Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_data-vbounds.numbers] PASSED [ 18%]
2021-07-06T06:25:13.9854339Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_data-vbounds.percentile] PASSED [ 18%]
2021-07-06T06:25:15.7307446Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_data-vbounds.vcenter] PASSED [ 18%]
2021-07-06T06:25:17.5111390Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_data-vbounds.norm] PASSED [ 18%]
2021-07-06T06:25:19.2273332Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_right-vbounds.default] PASSED [ 18%]
2021-07-06T06:25:20.9636890Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_right-vbounds.numbers] PASSED [ 18%]
2021-07-06T06:25:22.7258474Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_right-vbounds.percentile] PASSED [ 19%]
2021-07-06T06:25:24.4940220Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_right-vbounds.vcenter] PASSED [ 19%]
2021-07-06T06:25:26.2445940Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.on_right-vbounds.norm] PASSED [ 19%]
2021-07-06T06:25:27.9736009Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.off-vbounds.default] PASSED [ 19%]
2021-07-06T06:25:29.7538315Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.off-vbounds.numbers] PASSED [ 19%]
2021-07-06T06:25:31.5639676Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.off-vbounds.percentile] PASSED [ 19%]
2021-07-06T06:25:33.3091497Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.off-vbounds.vcenter] PASSED [ 19%]
2021-07-06T06:25:35.0270856Z scanpy/tests/test_embedding_plots.py::test_missing_values_continuous[spatial-na_color.default-legend.off-vbounds.norm] PASSED [ 20%]
2021-07-06T06:25:35.9438253Z scanpy/tests/test_embedding_plots.py::test_enumerated_palettes[pca] PASSED [ 20%]
2021-07-06T06:25:38.2744852Z scanpy/tests/test_embedding_plots.py::test_enumerated_palettes[spatial] PASSED [ 20%]
2021-07-06T06:25:39.1296738Z scanpy/tests/test_embedding_plots.py::test_visium_circles PASSED [ 20%]
2021-07-06T06:25:39.9121780Z scanpy/tests/test_embedding_plots.py::test_visium_default PASSED [ 20%]
2021-07-06T06:25:43.5393504Z scanpy/tests/test_embedding_plots.py::test_visium_empty_img_key PASSED [ 20%]
2021-07-06T06:25:45.7401418Z scanpy/tests/test_embedding_plots.py::test_spatial_general PASSED [ 20%]
2021-07-06T06:25:48.0711720Z scanpy/tests/test_embedding_plots.py::test_spatial_external_img PASSED [ 21%]
2021-07-06T06:25:49.5758462Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency[crop] PASSED [ 21%]
2021-07-06T06:25:51.3472076Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency[size:.5] PASSED [ 21%]
2021-07-06T06:25:53.0789716Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency[size:2] PASSED [ 21%]
2021-07-06T06:25:54.8215517Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency[spotsize] PASSED [ 21%]
2021-07-06T06:25:56.5564163Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency[bw] PASSED [ 21%]
2021-07-06T06:25:58.3327845Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency[img] PASSED [ 21%]
2021-07-06T06:26:00.0908382Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency[na_color.transparent] PASSED [ 21%]
2021-07-06T06:26:01.9118597Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency[na_color.lightgray] PASSED [ 22%]
2021-07-06T06:26:03.2210659Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency_no_img[crop] PASSED [ 22%]
2021-07-06T06:26:04.5366820Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency_no_img[size:.5] PASSED [ 22%]
2021-07-06T06:26:05.8324649Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency_no_img[size:2] PASSED [ 22%]
2021-07-06T06:26:07.1447058Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency_no_img[spotsize] PASSED [ 22%]
2021-07-06T06:26:07.1474192Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency_no_img[bw] SKIPPED [ 22%]
2021-07-06T06:26:08.8399633Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency_no_img[img] PASSED [ 22%]
2021-07-06T06:26:10.1668111Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency_no_img[na_color.transparent] PASSED [ 23%]
2021-07-06T06:26:11.4747074Z scanpy/tests/test_embedding_plots.py::test_manual_equivalency_no_img[na_color.lightgray] PASSED [ 23%]
2021-07-06T06:26:12.8753119Z scanpy/tests/test_embedding_plots.py::test_white_background_vs_no_img[crop] PASSED [ 23%]
2021-07-06T06:26:14.5450230Z scanpy/tests/test_embedding_plots.py::test_white_background_vs_no_img[size:.5] PASSED [ 23%]
2021-07-06T06:26:16.2885382Z scanpy/tests/test_embedding_plots.py::test_white_background_vs_no_img[size:2] PASSED [ 23%]
2021-07-06T06:26:18.0034766Z scanpy/tests/test_embedding_plots.py::test_white_background_vs_no_img[spotsize] PASSED [ 23%]
2021-07-06T06:26:18.0069839Z scanpy/tests/test_embedding_plots.py::test_white_background_vs_no_img[bw] SKIPPED [ 23%]
2021-07-06T06:26:18.0100670Z scanpy/tests/test_embedding_plots.py::test_white_background_vs_no_img[img] SKIPPED [ 23%]
2021-07-06T06:26:18.0132469Z scanpy/tests/test_embedding_plots.py::test_white_background_vs_no_img[na_color.transparent] SKIPPED [ 24%]
2021-07-06T06:26:18.0160658Z scanpy/tests/test_embedding_plots.py::test_white_background_vs_no_img[na_color.lightgray] SKIPPED [ 24%]
2021-07-06T06:26:20.8828456Z scanpy/tests/test_embedding_plots.py::test_spatial_na_color PASSED [ 24%]
2021-07-06T06:26:22.5547320Z scanpy/tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups PASSED [ 24%]
2021-07-06T06:26:22.6041435Z scanpy/tests/test_get.py::test_obs_df PASSED [ 24%]
2021-07-06T06:26:22.6116093Z scanpy/tests/test_get.py::test_repeated_gene_symbols PASSED [ 24%]
2021-07-06T06:26:22.7752171Z scanpy/tests/test_get.py::test_backed_vs_memory PASSED [ 24%]
2021-07-06T06:26:22.8692176Z scanpy/tests/test_get.py::test_column_content PASSED [ 25%]
2021-07-06T06:26:22.8974178Z scanpy/tests/test_get.py::test_var_df PASSED [ 25%]
2021-07-06T06:26:22.9038042Z scanpy/tests/test_get.py::test_just_mapping_keys[obs_df] PASSED [ 25%]
2021-07-06T06:26:22.9132001Z scanpy/tests/test_get.py::test_just_mapping_keys[var_df] PASSED [ 25%]
2021-07-06T06:26:22.9150283Z scanpy/tests/test_get.py::test_non_unique_cols_value_error PASSED [ 25%]
2021-07-06T06:26:22.9187984Z scanpy/tests/test_get.py::test_non_unique_var_index_value_error PASSED [ 25%]
2021-07-06T06:26:22.9218930Z scanpy/tests/test_get.py::test_keys_in_both_obs_and_var_index_value_error PASSED [ 25%]
2021-07-06T06:26:22.9255004Z scanpy/tests/test_get.py::test_repeated_cols[obs_df] PASSED [ 26%]
2021-07-06T06:26:22.9315467Z scanpy/tests/test_get.py::test_repeated_cols[var_df] PASSED [ 26%]
2021-07-06T06:26:22.9354825Z scanpy/tests/test_get.py::test_repeated_index_vals[obs_df] PASSED [ 26%]
2021-07-06T06:26:22.9396317Z scanpy/tests/test_get.py::test_repeated_index_vals[var_df] PASSED [ 26%]
2021-07-06T06:26:22.9471470Z scanpy/tests/test_get.py::test_shared_key_errors[obs_df] PASSED [ 26%]
2021-07-06T06:26:22.9527821Z scanpy/tests/test_get.py::test_shared_key_errors[var_df] PASSED [ 26%]
2021-07-06T06:26:22.9590605Z scanpy/tests/test_get.py::test_shared_key_errors[obs_df:use_raw] PASSED [ 26%]
2021-07-06T06:26:22.9661872Z scanpy/tests/test_get.py::test_shared_key_errors[obs_df:gene_symbols] PASSED [ 26%]
2021-07-06T06:26:22.9736584Z scanpy/tests/test_get.py::test_shared_key_errors[obs_df:gene_symbols,use_raw] PASSED [ 27%]
2021-07-06T06:26:23.3902362Z scanpy/tests/test_get.py::test_rank_genes_groups_df PASSED [ 27%]
2021-07-06T06:26:24.2020069Z scanpy/tests/test_highly_variable_genes.py::test_highly_variable_genes_basic PASSED [ 27%]
2021-07-06T06:26:24.3574484Z scanpy/tests/test_highly_variable_genes.py::test_higly_variable_genes_compare_to_seurat PASSED [ 27%]
2021-07-06T06:26:30.0012886Z scanpy/tests/test_highly_variable_genes.py::test_higly_variable_genes_compare_to_seurat_v3 PASSED [ 27%]
2021-07-06T06:26:30.1521777Z scanpy/tests/test_highly_variable_genes.py::test_filter_genes_dispersion_compare_to_seurat PASSED [ 27%]
2021-07-06T06:26:30.5397705Z scanpy/tests/test_highly_variable_genes.py::test_highly_variable_genes_batches PASSED [ 27%]
2021-07-06T06:26:32.0129843Z scanpy/tests/test_highly_variable_genes.py::test_seurat_v3_mean_var_output_with_batchkey PASSED [ 28%]
2021-07-06T06:26:35.4659076Z scanpy/tests/test_ingest.py::test_representation ERROR [ 28%]
2021-07-06T06:26:36.8557044Z scanpy/tests/test_ingest.py::test_neighbors ERROR [ 28%]
2021-07-06T06:26:38.1661831Z scanpy/tests/test_ingest.py::test_neighbors_defaults[3] ERROR [ 28%]
2021-07-06T06:26:39.4758808Z scanpy/tests/test_ingest.py::test_neighbors_defaults[4] ERROR [ 28%]
2021-07-06T06:26:40.7814456Z scanpy/tests/test_ingest.py::test_ingest_function ERROR [ 28%]
2021-07-06T06:26:41.9174292Z scanpy/tests/test_ingest.py::test_ingest_map_embedding_umap FAILED [ 28%]
2021-07-06T06:26:41.9189750Z scanpy/tests/test_logging.py::test_defaults PASSED [ 28%]
2021-07-06T06:26:41.9218696Z scanpy/tests/test_logging.py::test_formats PASSED [ 29%]
2021-07-06T06:26:41.9244759Z scanpy/tests/test_logging.py::test_deep PASSED [ 29%]
2021-07-06T06:26:41.9279523Z scanpy/tests/test_logging.py::test_logfile PASSED [ 29%]
2021-07-06T06:26:41.9307179Z scanpy/tests/test_logging.py::test_timing PASSED [ 29%]
2021-07-06T06:26:41.9328151Z scanpy/tests/test_logging.py::test_call_outputs[print_header] PASSED [ 29%]
2021-07-06T06:26:42.0614687Z scanpy/tests/test_logging.py::test_call_outputs[print_versions] PASSED [ 29%]
2021-07-06T06:26:42.0635094Z scanpy/tests/test_logging.py::test_call_outputs[print_version_and_date] PASSED [ 29%]
2021-07-06T06:26:42.0673603Z scanpy/tests/test_marker_gene_overlap.py::test_marker_overlap_base PASSED [ 30%]
2021-07-06T06:26:42.0716076Z scanpy/tests/test_marker_gene_overlap.py::test_marker_overlap_normalization PASSED [ 30%]
2021-07-06T06:26:42.0755600Z scanpy/tests/test_marker_gene_overlap.py::test_marker_overlap_methods PASSED [ 30%]
2021-07-06T06:26:42.0798184Z scanpy/tests/test_marker_gene_overlap.py::test_marker_overlap_subsetting PASSED [ 30%]
2021-07-06T06:26:43.8415863Z scanpy/tests/test_metrics.py::test_gearys_c_consistency FAILED [ 30%]
2021-07-06T06:26:45.6972641Z scanpy/tests/test_metrics.py::test_gearys_c_correctness FAILED [ 30%]
2021-07-06T06:26:47.3457732Z scanpy/tests/test_metrics.py::test_morans_i_consistency FAILED [ 30%]
2021-07-06T06:26:48.9016614Z scanpy/tests/test_metrics.py::test_morans_i_correctness FAILED [ 31%]
2021-07-06T06:26:50.6552193Z scanpy/tests/test_metrics.py::test_graph_metrics_w_constant_values[asarray-gearys_c] FAILED [ 31%]
2021-07-06T06:26:52.4122838Z scanpy/tests/test_metrics.py::test_graph_metrics_w_constant_values[asarray-morans_i] FAILED [ 31%]
2021-07-06T06:26:55.0369093Z scanpy/tests/test_metrics.py::test_graph_metrics_w_constant_values[csr_matrix-gearys_c] FAILED [ 31%]
2021-07-06T06:26:56.7081859Z scanpy/tests/test_metrics.py::test_graph_metrics_w_constant_values[csr_matrix-morans_i] FAILED [ 31%]
2021-07-06T06:26:57.6354429Z scanpy/tests/test_metrics.py::test_graph_metrics_w_constant_values[csc_matrix-gearys_c] FAILED [ 31%]
2021-07-06T06:26:58.7554391Z scanpy/tests/test_metrics.py::test_graph_metrics_w_constant_values[csc_matrix-morans_i] FAILED [ 31%]
2021-07-06T06:26:58.7683053Z scanpy/tests/test_metrics.py::test_confusion_matrix PASSED [ 31%]
2021-07-06T06:26:58.8092235Z scanpy/tests/test_metrics.py::test_confusion_matrix_randomized PASSED [ 32%]
2021-07-06T06:26:58.8270484Z scanpy/tests/test_metrics.py::test_confusion_matrix_api PASSED [ 32%]
2021-07-06T06:27:00.0272596Z scanpy/tests/test_neighbors.py::test_umap_connectivities_euclidean FAILED [ 32%]
2021-07-06T06:27:00.0349070Z scanpy/tests/test_neighbors.py::test_gauss_noknn_connectivities_euclidean PASSED [ 32%]
2021-07-06T06:27:00.0486654Z scanpy/tests/test_neighbors.py::test_gauss_connectivities_euclidean PASSED [ 32%]
2021-07-06T06:27:00.0554046Z scanpy/tests/test_neighbors.py::test_metrics_argument PASSED [ 32%]
2021-07-06T06:27:01.2754775Z scanpy/tests/test_neighbors.py::test_use_rep_argument FAILED [ 32%]
2021-07-06T06:27:01.2858666Z scanpy/tests/test_neighbors.py::test_restore_n_neighbors[toarray] PASSED [ 33%]
2021-07-06T06:27:01.2954162Z scanpy/tests/test_neighbors.py::test_restore_n_neighbors[csr_matrix] PASSED [ 33%]
2021-07-06T06:27:02.4570394Z scanpy/tests/test_neighbors_key_added.py::test_neighbors_key_added FAILED [ 33%]
2021-07-06T06:27:03.8091771Z scanpy/tests/test_neighbors_key_added.py::test_neighbors_key_obsp[neighbors_key] FAILED [ 33%]
2021-07-06T06:27:05.1547469Z scanpy/tests/test_neighbors_key_added.py::test_neighbors_key_obsp[obsp] FAILED [ 33%]
2021-07-06T06:27:05.1674227Z scanpy/tests/test_normalization.py::test_normalize_total[float32-array] PASSED [ 33%]
2021-07-06T06:27:05.1805867Z scanpy/tests/test_normalization.py::test_normalize_total[float32-csr_matrix] PASSED [ 33%]
2021-07-06T06:27:05.1919085Z scanpy/tests/test_normalization.py::test_normalize_total[int64-array] PASSED [ 34%]
2021-07-06T06:27:05.2073171Z scanpy/tests/test_normalization.py::test_normalize_total[int64-csr_matrix] PASSED [ 34%]
2021-07-06T06:27:05.2351225Z scanpy/tests/test_normalization.py::test_normalize_total_rep[float32-asarray] PASSED [ 34%]
2021-07-06T06:27:05.2617741Z scanpy/tests/test_normalization.py::test_normalize_total_rep[float32-csr_matrix] PASSED [ 34%]
2021-07-06T06:27:05.2852264Z scanpy/tests/test_normalization.py::test_normalize_total_rep[int64-asarray] PASSED [ 34%]
2021-07-06T06:27:05.3111435Z scanpy/tests/test_normalization.py::test_normalize_total_rep[int64-csr_matrix] PASSED [ 34%]
2021-07-06T06:27:05.3188215Z scanpy/tests/test_normalization.py::test_normalize_total_layers[float32-array] PASSED [ 34%]
2021-07-06T06:27:05.3274188Z scanpy/tests/test_normalization.py::test_normalize_total_layers[float32-csr_matrix] PASSED [ 34%]
2021-07-06T06:27:05.3350689Z scanpy/tests/test_normalization.py::test_normalize_total_layers[int64-array] PASSED [ 35%]
2021-07-06T06:27:05.3434706Z scanpy/tests/test_normalization.py::test_normalize_total_layers[int64-csr_matrix] PASSED [ 35%]
2021-07-06T06:27:05.3531318Z scanpy/tests/test_normalization.py::test_normalize_total_view[float32-array] PASSED [ 35%]
2021-07-06T06:27:05.3641745Z scanpy/tests/test_normalization.py::test_normalize_total_view[float32-csr_matrix] PASSED [ 35%]
2021-07-06T06:27:05.3740807Z scanpy/tests/test_normalization.py::test_normalize_total_view[int64-array] PASSED [ 35%]
2021-07-06T06:27:05.3853098Z scanpy/tests/test_normalization.py::test_normalize_total_view[int64-csr_matrix] PASSED [ 35%]
2021-07-06T06:27:05.3870445Z scanpy/tests/test_package_structure.py::test_function_headers[print_header] PASSED [ 35%]
2021-07-06T06:27:05.3889245Z scanpy/tests/test_package_structure.py::test_function_headers[print_versions] PASSED [ 36%]
2021-07-06T06:27:05.3906517Z scanpy/tests/test_package_structure.py::test_function_headers[print_version_and_date] PASSED [ 36%]
2021-07-06T06:27:05.3927727Z scanpy/tests/test_package_structure.py::test_function_headers[error] PASSED [ 36%]
2021-07-06T06:27:05.3944346Z scanpy/tests/test_package_structure.py::test_function_headers[warning] PASSED [ 36%]
2021-07-06T06:27:05.3962861Z scanpy/tests/test_package_structure.py::test_function_headers[info] PASSED [ 36%]
2021-07-06T06:27:05.3980785Z scanpy/tests/test_package_structure.py::test_function_headers[hint] PASSED [ 36%]
2021-07-06T06:27:05.3998336Z scanpy/tests/test_package_structure.py::test_function_headers[debug] PASSED [ 36%]
2021-07-06T06:27:05.4016006Z scanpy/tests/test_package_structure.py::test_function_headers[override] PASSED [ 36%]
2021-07-06T06:27:05.4033629Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups_df0] PASSED [ 37%]
2021-07-06T06:27:05.4050312Z scanpy/tests/test_package_structure.py::test_function_headers[obs_df0] PASSED [ 37%]
2021-07-06T06:27:05.4070811Z scanpy/tests/test_package_structure.py::test_function_headers[var_df0] PASSED [ 37%]
2021-07-06T06:27:05.4094461Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups_df1] PASSED [ 37%]
2021-07-06T06:27:05.4108976Z scanpy/tests/test_package_structure.py::test_function_headers[obs_df1] PASSED [ 37%]
2021-07-06T06:27:05.4139994Z scanpy/tests/test_package_structure.py::test_function_headers[var_df1] PASSED [ 37%]
2021-07-06T06:27:05.4164874Z scanpy/tests/test_package_structure.py::test_function_headers[neighbors0] PASSED [ 37%]
2021-07-06T06:27:05.4185359Z scanpy/tests/test_package_structure.py::test_function_headers[compute_neighbors_umap] PASSED [ 38%]
2021-07-06T06:27:05.4201816Z scanpy/tests/test_package_structure.py::test_function_headers[compute_neighbors_rapids] PASSED [ 38%]
2021-07-06T06:27:05.4220489Z scanpy/tests/test_package_structure.py::test_function_headers[restrict] PASSED [ 38%]
2021-07-06T06:27:05.4241126Z scanpy/tests/test_package_structure.py::test_function_headers[to_igraph0] PASSED [ 38%]
2021-07-06T06:27:05.4260269Z scanpy/tests/test_package_structure.py::test_function_headers[compute_neighbors0] PASSED [ 38%]
2021-07-06T06:27:05.4275951Z scanpy/tests/test_package_structure.py::test_function_headers[compute_transitions0] PASSED [ 38%]
2021-07-06T06:27:05.4308026Z scanpy/tests/test_package_structure.py::test_function_headers[compute_eigen0] PASSED [ 38%]
2021-07-06T06:27:05.4327984Z scanpy/tests/test_package_structure.py::test_function_headers[recipe_zheng17] PASSED [ 39%]
2021-07-06T06:27:05.4354123Z scanpy/tests/test_package_structure.py::test_function_headers[recipe_weinreb17] PASSED [ 39%]
2021-07-06T06:27:05.4375135Z scanpy/tests/test_package_structure.py::test_function_headers[recipe_seurat] PASSED [ 39%]
2021-07-06T06:27:05.4396603Z scanpy/tests/test_package_structure.py::test_function_headers[filter_cells] PASSED [ 39%]
2021-07-06T06:27:05.4417638Z scanpy/tests/test_package_structure.py::test_function_headers[filter_genes] PASSED [ 39%]
2021-07-06T06:27:05.4439422Z scanpy/tests/test_package_structure.py::test_function_headers[filter_genes_dispersion0] PASSED [ 39%]
2021-07-06T06:27:05.4461895Z scanpy/tests/test_package_structure.py::test_function_headers[highly_variable_genes0] PASSED [ 39%]
2021-07-06T06:27:05.4479212Z scanpy/tests/test_package_structure.py::test_function_headers[log1p] PASSED [ 39%]
2021-07-06T06:27:05.4497914Z scanpy/tests/test_package_structure.py::test_function_headers[sqrt] PASSED [ 40%]
2021-07-06T06:27:05.4514559Z scanpy/tests/test_package_structure.py::test_function_headers[scale] PASSED [ 40%]
2021-07-06T06:27:05.4531398Z scanpy/tests/test_package_structure.py::test_function_headers[subsample] PASSED [ 40%]
2021-07-06T06:27:05.4550503Z scanpy/tests/test_package_structure.py::test_function_headers[normalize_per_cell] PASSED [ 40%]
2021-07-06T06:27:05.4568769Z scanpy/tests/test_package_structure.py::test_function_headers[regress_out] PASSED [ 40%]
2021-07-06T06:27:05.4588804Z scanpy/tests/test_package_structure.py::test_function_headers[downsample_counts] PASSED [ 40%]
2021-07-06T06:27:05.4608302Z scanpy/tests/test_package_structure.py::test_function_headers[pca0] PASSED [ 40%]
2021-07-06T06:27:05.4624050Z scanpy/tests/test_package_structure.py::test_function_headers[calculate_qc_metrics] PASSED [ 41%]
2021-07-06T06:27:05.4643288Z scanpy/tests/test_package_structure.py::test_function_headers[combat] PASSED [ 41%]
2021-07-06T06:27:05.4668696Z scanpy/tests/test_package_structure.py::test_function_headers[normalize_total] PASSED [ 41%]
2021-07-06T06:27:05.4698343Z scanpy/tests/test_package_structure.py::test_function_headers[neighbors1] PASSED [ 41%]
2021-07-06T06:27:05.4705986Z scanpy/tests/test_package_structure.py::test_function_headers[read0] PASSED [ 41%]
2021-07-06T06:27:05.4722247Z scanpy/tests/test_package_structure.py::test_function_headers[read_10x_h50] PASSED [ 41%]
2021-07-06T06:27:05.4741292Z scanpy/tests/test_package_structure.py::test_function_headers[read_visium0] PASSED [ 41%]
2021-07-06T06:27:05.4761558Z scanpy/tests/test_package_structure.py::test_function_headers[read_10x_mtx0] PASSED [ 42%]
2021-07-06T06:27:05.4780819Z scanpy/tests/test_package_structure.py::test_function_headers[write0] PASSED [ 42%]
2021-07-06T06:27:05.4800389Z scanpy/tests/test_package_structure.py::test_function_headers[read_params] PASSED [ 42%]
2021-07-06T06:27:05.4822097Z scanpy/tests/test_package_structure.py::test_function_headers[write_params] PASSED [ 42%]
2021-07-06T06:27:05.4838669Z scanpy/tests/test_package_structure.py::test_function_headers[is_float] PASSED [ 42%]
2021-07-06T06:27:05.4856705Z scanpy/tests/test_package_structure.py::test_function_headers[is_int] PASSED [ 42%]
2021-07-06T06:27:05.4876024Z scanpy/tests/test_package_structure.py::test_function_headers[convert_bool] PASSED [ 42%]
2021-07-06T06:27:05.4894488Z scanpy/tests/test_package_structure.py::test_function_headers[convert_string] PASSED [ 42%]
2021-07-06T06:27:05.4914747Z scanpy/tests/test_package_structure.py::test_function_headers[get_used_files] PASSED [ 43%]
2021-07-06T06:27:05.4934371Z scanpy/tests/test_package_structure.py::test_function_headers[is_valid_filename] PASSED [ 43%]
2021-07-06T06:27:05.4953260Z scanpy/tests/test_package_structure.py::test_function_headers[pca1] PASSED [ 43%]
2021-07-06T06:27:05.4969541Z scanpy/tests/test_package_structure.py::test_function_headers[tsne0] PASSED [ 43%]
2021-07-06T06:27:05.4988021Z scanpy/tests/test_package_structure.py::test_function_headers[umap0] PASSED [ 43%]
2021-07-06T06:27:05.5004257Z scanpy/tests/test_package_structure.py::test_function_headers[diffmap0] PASSED [ 43%]
2021-07-06T06:27:05.5023118Z scanpy/tests/test_package_structure.py::test_function_headers[draw_graph0] PASSED [ 43%]
2021-07-06T06:27:05.5039752Z scanpy/tests/test_package_structure.py::test_function_headers[paga0] PASSED [ 44%]
2021-07-06T06:27:05.5062183Z scanpy/tests/test_package_structure.py::test_function_headers[paga_degrees] PASSED [ 44%]
2021-07-06T06:27:05.5083102Z scanpy/tests/test_package_structure.py::test_function_headers[paga_expression_entropies] PASSED [ 44%]
2021-07-06T06:27:05.5101873Z scanpy/tests/test_package_structure.py::test_function_headers[paga_compare_paths] PASSED [ 44%]
2021-07-06T06:27:05.5121528Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups0] PASSED [ 44%]
2021-07-06T06:27:05.5142907Z scanpy/tests/test_package_structure.py::test_function_headers[filter_rank_genes_groups] PASSED [ 44%]
2021-07-06T06:27:05.5163571Z scanpy/tests/test_package_structure.py::test_function_headers[dpt] PASSED [ 44%]
2021-07-06T06:27:05.5181731Z scanpy/tests/test_package_structure.py::test_function_headers[leiden] PASSED [ 44%]
2021-07-06T06:27:05.5200619Z scanpy/tests/test_package_structure.py::test_function_headers[louvain] PASSED [ 45%]
2021-07-06T06:27:05.5219529Z scanpy/tests/test_package_structure.py::test_function_headers[sim0] PASSED [ 45%]
2021-07-06T06:27:05.5239583Z scanpy/tests/test_package_structure.py::test_function_headers[score_genes] PASSED [ 45%]
2021-07-06T06:27:05.5258868Z scanpy/tests/test_package_structure.py::test_function_headers[score_genes_cell_cycle] PASSED [ 45%]
2021-07-06T06:27:05.5276425Z scanpy/tests/test_package_structure.py::test_function_headers[dendrogram0] PASSED [ 45%]
2021-07-06T06:27:05.5296023Z scanpy/tests/test_package_structure.py::test_function_headers[embedding_density0] PASSED [ 45%]
2021-07-06T06:27:05.5314561Z scanpy/tests/test_package_structure.py::test_function_headers[marker_gene_overlap] PASSED [ 45%]
2021-07-06T06:27:05.5335793Z scanpy/tests/test_package_structure.py::test_function_headers[ingest] PASSED [ 46%]
2021-07-06T06:27:05.5356085Z scanpy/tests/test_package_structure.py::test_function_headers[fit] PASSED [ 46%]
2021-07-06T06:27:05.5374308Z scanpy/tests/test_package_structure.py::test_function_headers[neighbors2] PASSED [ 46%]
2021-07-06T06:27:05.5393524Z scanpy/tests/test_package_structure.py::test_function_headers[map_embedding] PASSED [ 46%]
2021-07-06T06:27:05.5412143Z scanpy/tests/test_package_structure.py::test_function_headers[map_labels] PASSED [ 46%]
2021-07-06T06:27:05.5428635Z scanpy/tests/test_package_structure.py::test_function_headers[to_adata] PASSED [ 46%]
2021-07-06T06:27:05.5456665Z scanpy/tests/test_package_structure.py::test_function_headers[to_adata_joint] PASSED [ 46%]
2021-07-06T06:27:05.5465697Z scanpy/tests/test_package_structure.py::test_function_headers[scatter] PASSED [ 47%]
2021-07-06T06:27:05.5481285Z scanpy/tests/test_package_structure.py::test_function_headers[violin] PASSED [ 47%]
2021-07-06T06:27:05.5501446Z scanpy/tests/test_package_structure.py::test_function_headers[ranking] PASSED [ 47%]
2021-07-06T06:27:05.5519546Z scanpy/tests/test_package_structure.py::test_function_headers[clustermap] PASSED [ 47%]
2021-07-06T06:27:05.5535744Z scanpy/tests/test_package_structure.py::test_function_headers[tracksplot] PASSED [ 47%]
2021-07-06T06:27:05.5554687Z scanpy/tests/test_package_structure.py::test_function_headers[dendrogram1] PASSED [ 47%]
2021-07-06T06:27:05.5574045Z scanpy/tests/test_package_structure.py::test_function_headers[correlation_matrix] PASSED [ 47%]
2021-07-06T06:27:05.5595906Z scanpy/tests/test_package_structure.py::test_function_headers[heatmap] PASSED [ 47%]
2021-07-06T06:27:05.5614142Z scanpy/tests/test_package_structure.py::test_function_headers[style0] PASSED [ 48%]
2021-07-06T06:27:05.5633155Z scanpy/tests/test_package_structure.py::test_function_headers[legend] PASSED [ 48%]
2021-07-06T06:27:05.5658365Z scanpy/tests/test_package_structure.py::test_function_headers[dotplot] PASSED [ 48%]
2021-07-06T06:27:05.5675013Z scanpy/tests/test_package_structure.py::test_function_headers[style1] PASSED [ 48%]
2021-07-06T06:27:05.5695767Z scanpy/tests/test_package_structure.py::test_function_headers[matrixplot] PASSED [ 48%]
2021-07-06T06:27:05.5715084Z scanpy/tests/test_package_structure.py::test_function_headers[style2] PASSED [ 48%]
2021-07-06T06:27:05.5732630Z scanpy/tests/test_package_structure.py::test_function_headers[stacked_violin] PASSED [ 48%]
2021-07-06T06:27:05.5751875Z scanpy/tests/test_package_structure.py::test_function_headers[filter_genes_dispersion1] PASSED [ 49%]
2021-07-06T06:27:05.5769214Z scanpy/tests/test_package_structure.py::test_function_headers[highly_variable_genes1] PASSED [ 49%]
2021-07-06T06:27:05.5787912Z scanpy/tests/test_package_structure.py::test_function_headers[embedding0] PASSED [ 49%]
2021-07-06T06:27:05.5806269Z scanpy/tests/test_package_structure.py::test_function_headers[pca2] PASSED [ 49%]
2021-07-06T06:27:05.5825268Z scanpy/tests/test_package_structure.py::test_function_headers[diffmap1] PASSED [ 49%]
2021-07-06T06:27:05.5845435Z scanpy/tests/test_package_structure.py::test_function_headers[draw_graph1] PASSED [ 49%]
2021-07-06T06:27:05.5863217Z scanpy/tests/test_package_structure.py::test_function_headers[tsne1] PASSED [ 49%]
2021-07-06T06:27:05.5880295Z scanpy/tests/test_package_structure.py::test_function_headers[umap1] PASSED [ 50%]
2021-07-06T06:27:05.5899044Z scanpy/tests/test_package_structure.py::test_function_headers[spatial] PASSED [ 50%]
2021-07-06T06:27:05.5918857Z scanpy/tests/test_package_structure.py::test_function_headers[pca_loadings] PASSED [ 50%]
2021-07-06T06:27:05.5935849Z scanpy/tests/test_package_structure.py::test_function_headers[pca3] PASSED [ 50%]
2021-07-06T06:27:05.5959195Z scanpy/tests/test_package_structure.py::test_function_headers[pca_overview] PASSED [ 50%]
2021-07-06T06:27:05.5977351Z scanpy/tests/test_package_structure.py::test_function_headers[pca_variance_ratio] PASSED [ 50%]
2021-07-06T06:27:05.6000595Z scanpy/tests/test_package_structure.py::test_function_headers[paga1] PASSED [ 50%]
2021-07-06T06:27:05.6019214Z scanpy/tests/test_package_structure.py::test_function_headers[paga_adjacency] PASSED [ 50%]
2021-07-06T06:27:05.6038945Z scanpy/tests/test_package_structure.py::test_function_headers[paga_compare] PASSED [ 51%]
2021-07-06T06:27:05.6057930Z scanpy/tests/test_package_structure.py::test_function_headers[paga_path] PASSED [ 51%]
2021-07-06T06:27:05.6075435Z scanpy/tests/test_package_structure.py::test_function_headers[dpt_timeseries] PASSED [ 51%]
2021-07-06T06:27:05.6093424Z scanpy/tests/test_package_structure.py::test_function_headers[dpt_groups_pseudotime] PASSED [ 51%]
2021-07-06T06:27:05.6110888Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups1] PASSED [ 51%]
2021-07-06T06:27:05.6130060Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups_violin] PASSED [ 51%]
2021-07-06T06:27:05.6149528Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups_dotplot] PASSED [ 51%]
2021-07-06T06:27:05.6174714Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups_heatmap] PASSED [ 52%]
2021-07-06T06:27:05.6192572Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups_stacked_violin] PASSED [ 52%]
2021-07-06T06:27:05.6208695Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups_matrixplot] PASSED [ 52%]
2021-07-06T06:27:05.6226549Z scanpy/tests/test_package_structure.py::test_function_headers[rank_genes_groups_tracksplot] PASSED [ 52%]
2021-07-06T06:27:05.6246309Z scanpy/tests/test_package_structure.py::test_function_headers[sim1] PASSED [ 52%]
2021-07-06T06:27:05.6268209Z scanpy/tests/test_package_structure.py::test_function_headers[embedding_density1] PASSED [ 52%]
2021-07-06T06:27:05.6286964Z scanpy/tests/test_package_structure.py::test_function_headers[set_rcParams_scanpy] PASSED [ 52%]
2021-07-06T06:27:05.6306515Z scanpy/tests/test_package_structure.py::test_function_headers[set_rcParams_defaults] PASSED [ 52%]
2021-07-06T06:27:05.6324156Z scanpy/tests/test_package_structure.py::test_function_headers[matrix] PASSED [ 53%]
2021-07-06T06:27:05.6342620Z scanpy/tests/test_package_structure.py::test_function_headers[timeseries] PASSED [ 53%]
2021-07-06T06:27:05.6362454Z scanpy/tests/test_package_structure.py::test_function_headers[timeseries_subplot] PASSED [ 53%]
2021-07-06T06:27:05.6380732Z scanpy/tests/test_package_structure.py::test_function_headers[timeseries_as_heatmap] PASSED [ 53%]
2021-07-06T06:27:05.6402489Z scanpy/tests/test_package_structure.py::test_function_headers[highest_expr_genes] PASSED [ 53%]
2021-07-06T06:27:05.6422081Z scanpy/tests/test_package_structure.py::test_function_headers[blobs] PASSED [ 53%]
2021-07-06T06:27:05.6443171Z scanpy/tests/test_package_structure.py::test_function_headers[burczynski06] PASSED [ 53%]
2021-07-06T06:27:05.6465744Z scanpy/tests/test_package_structure.py::test_function_headers[krumsiek11] PASSED [ 54%]
2021-07-06T06:27:05.6487943Z scanpy/tests/test_package_structure.py::test_function_headers[moignard15] PASSED [ 54%]
2021-07-06T06:27:05.6506669Z scanpy/tests/test_package_structure.py::test_function_headers[paul15] PASSED [ 54%]
2021-07-06T06:27:05.6523777Z scanpy/tests/test_package_structure.py::test_function_headers[toggleswitch] PASSED [ 54%]
2021-07-06T06:27:05.6539920Z scanpy/tests/test_package_structure.py::test_function_headers[pbmc68k_reduced] PASSED [ 54%]
2021-07-06T06:27:05.6572166Z scanpy/tests/test_package_structure.py::test_function_headers[pbmc3k] PASSED [ 54%]
2021-07-06T06:27:05.6591381Z scanpy/tests/test_package_structure.py::test_function_headers[pbmc3k_processed] PASSED [ 54%]
2021-07-06T06:27:05.6612111Z scanpy/tests/test_package_structure.py::test_function_headers[visium_sge] PASSED [ 55%]
2021-07-06T06:27:05.6633477Z scanpy/tests/test_package_structure.py::test_function_headers[ebi_expression_atlas] PASSED [ 55%]
2021-07-06T06:27:05.6651855Z scanpy/tests/test_package_structure.py::test_function_headers[biomart_annotations] PASSED [ 55%]
2021-07-06T06:27:05.6668463Z scanpy/tests/test_package_structure.py::test_function_headers[gene_coordinates] PASSED [ 55%]
2021-07-06T06:27:05.6685608Z scanpy/tests/test_package_structure.py::test_function_headers[mitochondrial_genes] PASSED [ 55%]
2021-07-06T06:27:05.6705576Z scanpy/tests/test_package_structure.py::test_function_headers[enrich] PASSED [ 55%]
2021-07-06T06:27:05.6726363Z scanpy/tests/test_package_structure.py::test_function_headers[cyclone] PASSED [ 55%]
2021-07-06T06:27:05.6749373Z scanpy/tests/test_package_structure.py::test_function_headers[sandbag] PASSED [ 55%]
2021-07-06T06:27:05.6769633Z scanpy/tests/test_package_structure.py::test_function_headers[phate0] PASSED [ 56%]
2021-07-06T06:27:05.6787920Z scanpy/tests/test_package_structure.py::test_function_headers[phenograph] PASSED [ 56%]
2021-07-06T06:27:05.6807768Z scanpy/tests/test_package_structure.py::test_function_headers[palantir] PASSED [ 56%]
2021-07-06T06:27:05.6824216Z scanpy/tests/test_package_structure.py::test_function_headers[palantir_results] PASSED [ 56%]
2021-07-06T06:27:05.6840990Z scanpy/tests/test_package_structure.py::test_function_headers[trimap0] PASSED [ 56%]
2021-07-06T06:27:05.6860065Z scanpy/tests/test_package_structure.py::test_function_headers[harmony_timeseries0] PASSED [ 56%]
2021-07-06T06:27:05.6878976Z scanpy/tests/test_package_structure.py::test_function_headers[sam0] PASSED [ 56%]
2021-07-06T06:27:05.6897996Z scanpy/tests/test_package_structure.py::test_function_headers[wishbone] PASSED [ 57%]
2021-07-06T06:27:05.6916037Z scanpy/tests/test_package_structure.py::test_function_headers[embedding1] PASSED [ 57%]
2021-07-06T06:27:05.6933704Z scanpy/tests/test_package_structure.py::test_function_headers[phate1] PASSED [ 57%]
2021-07-06T06:27:05.6951825Z scanpy/tests/test_package_structure.py::test_function_headers[trimap1] PASSED [ 57%]
2021-07-06T06:27:05.6972376Z scanpy/tests/test_package_structure.py::test_function_headers[harmony_timeseries1] PASSED [ 57%]
2021-07-06T06:27:05.6990859Z scanpy/tests/test_package_structure.py::test_function_headers[sam1] PASSED [ 57%]
2021-07-06T06:27:05.7009861Z scanpy/tests/test_package_structure.py::test_function_headers[wishbone_marker_trajectory] PASSED [ 57%]
2021-07-06T06:27:05.7029513Z scanpy/tests/test_package_structure.py::test_function_headers[scrublet_score_distribution] PASSED [ 57%]
2021-07-06T06:27:05.7047816Z scanpy/tests/test_package_structure.py::test_function_headers[mnn_correct] PASSED [ 58%]
2021-07-06T06:27:05.7066936Z scanpy/tests/test_package_structure.py::test_function_headers[bbknn] PASSED [ 58%]
2021-07-06T06:27:05.7083285Z scanpy/tests/test_package_structure.py::test_function_headers[dca] PASSED [ 58%]
2021-07-06T06:27:05.7102812Z scanpy/tests/test_package_structure.py::test_function_headers[harmony_integrate] PASSED [ 58%]
2021-07-06T06:27:05.7120474Z scanpy/tests/test_package_structure.py::test_function_headers[magic] PASSED [ 58%]
2021-07-06T06:27:05.7139349Z scanpy/tests/test_package_structure.py::test_function_headers[scanorama_integrate] PASSED [ 58%]
2021-07-06T06:27:05.7158080Z scanpy/tests/test_package_structure.py::test_function_headers[hashsolo] PASSED [ 58%]
2021-07-06T06:27:05.7178848Z scanpy/tests/test_package_structure.py::test_function_headers[scrublet] PASSED [ 59%]
2021-07-06T06:27:05.7194550Z scanpy/tests/test_package_structure.py::test_function_headers[scrublet_simulate_doublets] PASSED [ 59%]
2021-07-06T06:27:05.7210761Z scanpy/tests/test_package_structure.py::test_function_headers[spring_project] PASSED [ 59%]
2021-07-06T06:27:05.7230311Z scanpy/tests/test_package_structure.py::test_function_headers[write_hdf5_genes] PASSED [ 59%]
2021-07-06T06:27:05.7248335Z scanpy/tests/test_package_structure.py::test_function_headers[write_hdf5_cells] PASSED [ 59%]
2021-07-06T06:27:05.7266102Z scanpy/tests/test_package_structure.py::test_function_headers[write_sparse_npz] PASSED [ 59%]
2021-07-06T06:27:05.7285404Z scanpy/tests/test_package_structure.py::test_function_headers[cellbrowser] PASSED [ 59%]
2021-07-06T06:27:05.7302468Z scanpy/tests/test_package_structure.py::test_function_headers[gearys_c] PASSED [ 60%]
2021-07-06T06:27:05.7320183Z scanpy/tests/test_package_structure.py::test_function_headers[confusion_matrix] PASSED [ 60%]
2021-07-06T06:27:05.7342260Z scanpy/tests/test_package_structure.py::test_function_headers[morans_i] PASSED [ 60%]
2021-07-06T06:27:05.7361900Z scanpy/tests/test_package_structure.py::test_function_headers[read1] PASSED [ 60%]
2021-07-06T06:27:05.7382491Z scanpy/tests/test_package_structure.py::test_function_headers[read_10x_h51] PASSED [ 60%]
2021-07-06T06:27:05.7401024Z scanpy/tests/test_package_structure.py::test_function_headers[read_10x_mtx1] PASSED [ 60%]
2021-07-06T06:27:05.7419335Z scanpy/tests/test_package_structure.py::test_function_headers[write1] PASSED [ 60%]
2021-07-06T06:27:05.7440590Z scanpy/tests/test_package_structure.py::test_function_headers[read_visium1] PASSED [ 60%]
2021-07-06T06:27:05.7459531Z scanpy/tests/test_package_structure.py::test_function_headers[to_igraph1] PASSED [ 61%]
2021-07-06T06:27:05.7506368Z scanpy/tests/test_package_structure.py::test_function_headers[compute_neighbors1] PASSED [ 61%]
2021-07-06T06:27:05.7507791Z scanpy/tests/test_package_structure.py::test_function_headers[compute_transitions1] PASSED [ 61%]
2021-07-06T06:27:05.7515311Z scanpy/tests/test_package_structure.py::test_function_headers[compute_eigen1] PASSED [ 61%]
2021-07-06T06:27:05.7530071Z scanpy/tests/test_package_structure.py::test_function_headers[main] PASSED [ 61%]
2021-07-06T06:27:05.7547523Z scanpy/tests/test_package_structure.py::test_function_headers[console_main] PASSED [ 61%]
2021-07-06T06:27:05.8876759Z scanpy/tests/test_package_structure.py::test_metadata PASSED [ 61%]
2021-07-06T06:27:05.9102561Z scanpy/tests/test_pca.py::test_pca_transform[scipy-csr] PASSED [ 62%]
2021-07-06T06:27:06.3232373Z scanpy/tests/test_pca.py::test_pca_transform[scipy-csc] PASSED [ 62%]
2021-07-06T06:27:06.3432093Z scanpy/tests/test_pca.py::test_pca_transform[np-ndarray] PASSED [ 62%]
2021-07-06T06:27:06.3582797Z scanpy/tests/test_pca.py::test_pca_shapes PASSED [ 62%]
2021-07-06T06:27:10.6718055Z scanpy/tests/test_pca.py::test_pca_sparse PASSED [ 62%]
2021-07-06T06:27:14.4862228Z scanpy/tests/test_pca.py::test_pca_reproducible[scipy-csr-float64] PASSED [ 62%]
2021-07-06T06:27:18.3115044Z scanpy/tests/test_pca.py::test_pca_reproducible[scipy-csr-float32] PASSED [ 62%]
2021-07-06T06:27:22.4376755Z scanpy/tests/test_pca.py::test_pca_reproducible[scipy-csc-float64] PASSED [ 63%]
2021-07-06T06:27:26.1364018Z scanpy/tests/test_pca.py::test_pca_reproducible[scipy-csc-float32] PASSED [ 63%]
2021-07-06T06:27:33.7232070Z scanpy/tests/test_pca.py::test_pca_reproducible[np-ndarray-float64] PASSED [ 63%]
2021-07-06T06:27:41.1037441Z scanpy/tests/test_pca.py::test_pca_reproducible[np-ndarray-float32] PASSED [ 63%]
2021-07-06T06:27:46.8722867Z scanpy/tests/test_pca.py::test_pca_chunked PASSED [ 63%]
2021-07-06T06:27:46.8749455Z scanpy/tests/test_performance.py::test_deferred_imports PASSED [ 63%]
2021-07-06T06:27:49.8947696Z scanpy/tests/test_plotting.py::test_heatmap PASSED [ 63%]
2021-07-06T06:27:50.6794393Z scanpy/tests/test_plotting.py::test_clustermap[None-master_clustermap] PASSED [ 63%]
2021-07-06T06:27:51.5943086Z scanpy/tests/test_plotting.py::test_clustermap[cell_type-master_clustermap_withcolor] PASSED [ 64%]
2021-07-06T06:27:52.0569617Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[dotplot-fn0] PASSED [ 64%]
2021-07-06T06:27:52.4576860Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[dotplot2-fn1] PASSED [ 64%]
2021-07-06T06:27:52.9839438Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[dotplot3-fn2] PASSED [ 64%]
2021-07-06T06:27:53.4604372Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[dotplot_std_scale_group-fn3] PASSED [ 64%]
2021-07-06T06:27:54.2160349Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[dotplot_dict-fn4] PASSED [ 64%]
2021-07-06T06:27:54.5551414Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[matrixplot-fn5] PASSED [ 64%]
2021-07-06T06:27:54.9983680Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[matrixplot_std_scale_var_dict-fn6] PASSED [ 65%]
2021-07-06T06:27:55.2923375Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[matrixplot_std_scale_group-fn7] PASSED [ 65%]
2021-07-06T06:27:55.6008342Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[matrixplot2-fn8] PASSED [ 65%]
2021-07-06T06:27:56.5955638Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[stacked_violin-fn9] PASSED [ 65%]
2021-07-06T06:27:57.9161581Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[stacked_violin_std_scale_var_dict-fn10] PASSED [ 65%]
2021-07-06T06:27:59.0033624Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[stacked_violin_std_scale_group-fn11] PASSED [ 65%]
2021-07-06T06:27:59.8211846Z scanpy/tests/test_plotting.py::test_dotplot_matrixplot_stacked_violin[stacked_violin_no_cat_obs-fn12] PASSED [ 65%]
2021-07-06T06:28:00.4385413Z scanpy/tests/test_plotting.py::test_dotplot_obj PASSED [ 65%]
2021-07-06T06:28:01.0396825Z scanpy/tests/test_plotting.py::test_matrixplot_obj PASSED [ 66%]
2021-07-06T06:28:02.8462572Z scanpy/tests/test_plotting.py::test_stacked_violin_obj PASSED [ 66%]
2021-07-06T06:28:03.8589415Z scanpy/tests/test_plotting.py::test_tracksplot PASSED [ 66%]
2021-07-06T06:28:06.6714174Z scanpy/tests/test_plotting.py::test_multiple_plots PASSED [ 66%]
2021-07-06T06:28:08.4376848Z scanpy/tests/test_plotting.py::test_violin PASSED [ 66%]
2021-07-06T06:28:09.2242542Z scanpy/tests/test_plotting.py::test_violin_without_raw PASSED [ 66%]
2021-07-06T06:28:09.4654289Z scanpy/tests/test_plotting.py::test_dendrogram PASSED [ 66%]
2021-07-06T06:28:09.9330400Z scanpy/tests/test_plotting.py::test_correlation PASSED [ 67%]
2021-07-06T06:28:11.9817898Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_sharey-fn0] PASSED [ 67%]
2021-07-06T06:28:13.8343861Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes-fn1] PASSED [ 67%]
2021-07-06T06:28:15.3805583Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_heatmap-fn2] PASSED [ 67%]
2021-07-06T06:28:16.6298671Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_heatmap_swap_axes-fn3] PASSED [ 67%]
2021-07-06T06:28:17.8772345Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_heatmap_swap_axes_vcenter-fn4] PASSED [ 67%]
2021-07-06T06:28:20.1726950Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_stacked_violin-fn5] PASSED [ 67%]
2021-07-06T06:28:21.8915452Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_dotplot-fn6] PASSED [ 68%]
2021-07-06T06:28:23.1780467Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_dotplot_gene_names-fn7] PASSED [ 68%]
2021-07-06T06:28:25.5345014Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_dotplot_logfoldchange-fn8] PASSED [ 68%]
2021-07-06T06:28:27.6384365Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_dotplot_logfoldchange_vcenter-fn9] PASSED [ 68%]
2021-07-06T06:28:29.9095723Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_matrixplot-fn10] PASSED [ 68%]
2021-07-06T06:28:31.1748668Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_matrixplot_gene_names_symbol-fn11] PASSED [ 68%]
2021-07-06T06:28:33.3549146Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_matrixplot_n_genes_negative-fn12] PASSED [ 68%]
2021-07-06T06:28:35.5183725Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_matrixplot_swap_axes-fn13] PASSED [ 68%]
2021-07-06T06:28:37.9753650Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_matrixplot_swap_axes_vcenter-fn14] PASSED [ 69%]
2021-07-06T06:28:39.6026824Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_tracksplot-fn15] PASSED [ 69%]
2021-07-06T06:28:40.0521620Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_violin-fn16] PASSED [ 69%]
2021-07-06T06:28:40.5146265Z scanpy/tests/test_plotting.py::test_rank_genes_groups[ranked_genes_violin_not_raw-fn17] PASSED [ 69%]
2021-07-06T06:28:51.0527599Z scanpy/tests/test_plotting.py::test_plot_rank_genes_groups_gene_symbols[rank_genes_groups_dotplot] PASSED [ 69%]
2021-07-06T06:28:59.8484190Z scanpy/tests/test_plotting.py::test_plot_rank_genes_groups_gene_symbols[rank_genes_groups_heatmap] PASSED [ 69%]
2021-07-06T06:29:08.7560813Z scanpy/tests/test_plotting.py::test_plot_rank_genes_groups_gene_symbols[rank_genes_groups_matrixplot] PASSED [ 69%]
2021-07-06T06:29:23.7544149Z scanpy/tests/test_plotting.py::test_plot_rank_genes_groups_gene_symbols[rank_genes_groups_stacked_violin] PASSED [ 70%]
2021-07-06T06:29:43.4066208Z scanpy/tests/test_plotting.py::test_plot_rank_genes_groups_gene_symbols[rank_genes_groups_tracksplot] PASSED [ 70%]
2021-07-06T06:29:45.3513622Z scanpy/tests/test_plotting.py::test_rank_genes_groups_plots_n_genes_vs_var_names[rank_genes_groups_dotplot] PASSED [ 70%]
2021-07-06T06:29:47.1308116Z scanpy/tests/test_plotting.py::test_rank_genes_groups_plots_n_genes_vs_var_names[rank_genes_groups_heatmap] PASSED [ 70%]
2021-07-06T06:29:49.1931492Z scanpy/tests/test_plotting.py::test_rank_genes_groups_plots_n_genes_vs_var_names[rank_genes_groups_matrixplot] PASSED [ 70%]
2021-07-06T06:29:52.1788379Z scanpy/tests/test_plotting.py::test_rank_genes_groups_plots_n_genes_vs_var_names[rank_genes_groups_stacked_violin] PASSED [ 70%]
2021-07-06T06:29:56.5981282Z scanpy/tests/test_plotting.py::test_rank_genes_groups_plots_n_genes_vs_var_names[rank_genes_groups_tracksplot] PASSED [ 70%]
2021-07-06T06:29:57.0376117Z scanpy/tests/test_plotting.py::test_genes_symbols[heatmap-heatmap] PASSED [ 71%]
2021-07-06T06:29:57.7800913Z scanpy/tests/test_plotting.py::test_genes_symbols[dotplot-dotplot] PASSED [ 71%]
2021-07-06T06:29:58.1547198Z scanpy/tests/test_plotting.py::test_genes_symbols[matrixplot-matrixplot] PASSED [ 71%]
2021-07-06T06:29:59.1645143Z scanpy/tests/test_plotting.py::test_genes_symbols[stacked_violin-stacked_violin] PASSED [ 71%]
2021-07-06T06:30:00.2653397Z scanpy/tests/test_plotting.py::test_genes_symbols[tracksplot-tracksplot] PASSED [ 71%]
2021-07-06T06:30:01.7514928Z scanpy/tests/test_plotting.py::test_scatterplots[pca-fn0] ERROR [ 71%]
2021-07-06T06:30:02.4965754Z scanpy/tests/test_plotting.py::test_scatterplots[pca_with_fonts-fn1] ERROR [ 71%]
2021-07-06T06:30:03.2723698Z scanpy/tests/test_plotting.py::test_scatterplots[3dprojection-fn2] ERROR [ 71%]
2021-07-06T06:30:03.9049632Z scanpy/tests/test_plotting.py::test_scatterplots[multipanel-fn3] ERROR [ 72%]
2021-07-06T06:30:04.5322762Z scanpy/tests/test_plotting.py::test_scatterplots[multipanel_vcenter-fn4] ERROR [ 72%]
2021-07-06T06:30:05.2788078Z scanpy/tests/test_plotting.py::test_scatterplots[pca_sparse_layer-fn5] ERROR [ 72%]
2021-07-06T06:30:05.8240858Z scanpy/tests/test_plotting.py::test_scatterplots[tsne-fn6] XFAIL (sl...) [ 72%]
2021-07-06T06:30:06.5564668Z scanpy/tests/test_plotting.py::test_scatterplots[umap_nocolor-umap] ERROR [ 72%]
2021-07-06T06:30:07.3127074Z scanpy/tests/test_plotting.py::test_scatterplots[umap-fn8] ERROR [ 72%]
2021-07-06T06:30:08.0670233Z scanpy/tests/test_plotting.py::test_scatterplots[umap_gene_expr-fn9] ERROR [ 72%]
2021-07-06T06:30:08.8127921Z scanpy/tests/test_plotting.py::test_scatterplots[umap_layer-fn10] ERROR [ 73%]
2021-07-06T06:30:09.3348354Z scanpy/tests/test_plotting.py::test_scatterplots[umap_with_edges-fn11] ERROR [ 73%]
2021-07-06T06:30:10.0868170Z scanpy/tests/test_plotting.py::test_scatterplots[umap_symbols-fn12] ERROR [ 73%]
2021-07-06T06:30:10.3525002Z scanpy/tests/test_plotting.py::test_scatter_embedding_groups_and_size PASSED [ 73%]
2021-07-06T06:30:13.9997546Z scanpy/tests/test_plotting.py::test_scatter_embedding_add_outline_vmin_vmax_norm PASSED [ 73%]
2021-07-06T06:30:16.2247074Z scanpy/tests/test_plotting.py::test_timeseries PASSED [ 73%]
2021-07-06T06:30:16.6604720Z scanpy/tests/test_plotting.py::test_scatter_raw PASSED [ 73%]
2021-07-06T06:30:16.7460333Z scanpy/tests/test_plotting.py::test_scatter_specify_layer_and_raw PASSED [ 73%]
2021-07-06T06:30:19.1933788Z scanpy/tests/test_plotting.py::test_rankings PASSED [ 74%]
2021-07-06T06:30:21.7361703Z scanpy/tests/test_plotting.py::test_scatter_rep PASSED [ 74%]
2021-07-06T06:30:23.7448818Z scanpy/tests/test_plotting.py::test_paga PASSED [ 74%]
2021-07-06T06:30:24.4699014Z scanpy/tests/test_plotting.py::test_paga_path PASSED [ 74%]
2021-07-06T06:30:25.0906583Z scanpy/tests/test_plotting.py::test_paga_compare PASSED [ 74%]
2021-07-06T06:30:29.9480059Z scanpy/tests/test_plotting.py::test_no_copy PASSED [ 74%]
2021-07-06T06:30:30.4580471Z scanpy/tests/test_plotting.py::test_groupby_index PASSED [ 74%]
2021-07-06T06:30:31.2694072Z scanpy/tests/test_plotting.py::test_groupby_list PASSED [ 75%]
2021-07-06T06:30:31.3800566Z scanpy/tests/test_plotting.py::test_color_cycler PASSED [ 75%]
2021-07-06T06:30:31.3974051Z scanpy/tests/test_preprocessing.py::test_log1p PASSED [ 75%]
2021-07-06T06:30:31.4737216Z scanpy/tests/test_preprocessing.py::test_log1p_rep[<lambda>-None-int64] PASSED [ 75%]
2021-07-06T06:30:31.5545353Z scanpy/tests/test_preprocessing.py::test_log1p_rep[<lambda>-None-float32] PASSED [ 75%]
2021-07-06T06:30:31.6236444Z scanpy/tests/test_preprocessing.py::test_log1p_rep[<lambda>-None-float64] PASSED [ 75%]
2021-07-06T06:30:31.6983111Z scanpy/tests/test_preprocessing.py::test_log1p_rep[<lambda>-2-int64] PASSED [ 75%]
2021-07-06T06:30:31.7675825Z scanpy/tests/test_preprocessing.py::test_log1p_rep[<lambda>-2-float32] PASSED [ 76%]
2021-07-06T06:30:31.8395916Z scanpy/tests/test_preprocessing.py::test_log1p_rep[<lambda>-2-float64] PASSED [ 76%]
2021-07-06T06:30:31.9157503Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csr_matrix-None-int64] PASSED [ 76%]
2021-07-06T06:30:31.9908378Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csr_matrix-None-float32] PASSED [ 76%]
2021-07-06T06:30:32.0701034Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csr_matrix-None-float64] PASSED [ 76%]
2021-07-06T06:30:32.1524249Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csr_matrix-2-int64] PASSED [ 76%]
2021-07-06T06:30:32.2355432Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csr_matrix-2-float32] PASSED [ 76%]
2021-07-06T06:30:32.3141606Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csr_matrix-2-float64] PASSED [ 76%]
2021-07-06T06:30:32.3945509Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csc_matrix-None-int64] PASSED [ 77%]
2021-07-06T06:30:32.4726965Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csc_matrix-None-float32] PASSED [ 77%]
2021-07-06T06:30:32.5453909Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csc_matrix-None-float64] PASSED [ 77%]
2021-07-06T06:30:32.6194142Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csc_matrix-2-int64] PASSED [ 77%]
2021-07-06T06:30:32.6921098Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csc_matrix-2-float32] PASSED [ 77%]
2021-07-06T06:30:32.7658289Z scanpy/tests/test_preprocessing.py::test_log1p_rep[csc_matrix-2-float64] PASSED [ 77%]
2021-07-06T06:30:33.2042149Z scanpy/tests/test_preprocessing.py::test_mean_var_sparse PASSED [ 77%]
2021-07-06T06:30:33.2289943Z scanpy/tests/test_preprocessing.py::test_normalize_per_cell PASSED [ 78%]
2021-07-06T06:30:33.2350372Z scanpy/tests/test_preprocessing.py::test_subsample PASSED [ 78%]
2021-07-06T06:30:33.2396912Z scanpy/tests/test_preprocessing.py::test_subsample_copy PASSED [ 78%]
2021-07-06T06:30:33.3335259Z scanpy/tests/test_preprocessing.py::test_scale PASSED [ 78%]
2021-07-06T06:30:33.4330074Z scanpy/tests/test_preprocessing.py::test_scale_rep[<lambda>-True] PASSED [ 78%]
2021-07-06T06:30:33.5134276Z scanpy/tests/test_preprocessing.py::test_scale_rep[<lambda>-False] PASSED [ 78%]
2021-07-06T06:30:33.6017753Z scanpy/tests/test_preprocessing.py::test_scale_rep[csr_matrix-True] PASSED [ 78%]
2021-07-06T06:30:33.6840237Z scanpy/tests/test_preprocessing.py::test_scale_rep[csr_matrix-False] PASSED [ 78%]
2021-07-06T06:30:33.7751760Z scanpy/tests/test_preprocessing.py::test_scale_rep[csc_matrix-True] PASSED [ 79%]
2021-07-06T06:30:33.8606401Z scanpy/tests/test_preprocessing.py::test_scale_rep[csc_matrix-False] PASSED [ 79%]
2021-07-06T06:30:33.8665578Z scanpy/tests/test_preprocessing.py::test_scale_array[<lambda>-True] PASSED [ 79%]
2021-07-06T06:30:33.8726140Z scanpy/tests/test_preprocessing.py::test_scale_array[<lambda>-False] PASSED [ 79%]
2021-07-06T06:30:33.8819897Z scanpy/tests/test_preprocessing.py::test_scale_array[csr_matrix-True] PASSED [ 79%]
2021-07-06T06:30:33.8904395Z scanpy/tests/test_preprocessing.py::test_scale_array[csr_matrix-False] PASSED [ 79%]
2021-07-06T06:30:33.8992378Z scanpy/tests/test_preprocessing.py::test_scale_array[csc_matrix-True] PASSED [ 79%]
2021-07-06T06:30:33.9067481Z scanpy/tests/test_preprocessing.py::test_scale_array[csc_matrix-False] PASSED [ 80%]
2021-07-06T06:30:34.5225267Z scanpy/tests/test_preprocessing.py::test_recipe_plotting PASSED [ 80%]
2021-07-06T06:30:45.7953920Z scanpy/tests/test_preprocessing.py::test_regress_out_ordinal PASSED [ 80%]
2021-07-06T06:30:52.3831769Z scanpy/tests/test_preprocessing.py::test_regress_out_view PASSED [ 80%]
2021-07-06T06:30:52.6559105Z scanpy/tests/test_preprocessing.py::test_regress_out_categorical PASSED [ 80%]
2021-07-06T06:30:52.7244429Z scanpy/tests/test_preprocessing.py::test_regress_out_constants PASSED [ 80%]
2021-07-06T06:30:53.0189203Z scanpy/tests/test_preprocessing.py::test_regress_out_constants_equivalent PASSED [ 80%]
2021-07-06T06:30:56.3278588Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[<lambda>-True-int64] PASSED [ 81%]
2021-07-06T06:30:57.1516807Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[<lambda>-True-float32] PASSED [ 81%]
2021-07-06T06:30:57.9801592Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[<lambda>-True-float64] PASSED [ 81%]
2021-07-06T06:30:58.0826006Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[<lambda>-False-int64] PASSED [ 81%]
2021-07-06T06:30:58.1884981Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[<lambda>-False-float32] PASSED [ 81%]
2021-07-06T06:30:58.2906131Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[<lambda>-False-float64] PASSED [ 81%]
2021-07-06T06:30:58.3892949Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csr_matrix-True-int64] PASSED [ 81%]
2021-07-06T06:30:58.4870803Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csr_matrix-True-float32] PASSED [ 81%]
2021-07-06T06:30:58.5836276Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csr_matrix-True-float64] PASSED [ 82%]
2021-07-06T06:30:58.6879775Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csr_matrix-False-int64] PASSED [ 82%]
2021-07-06T06:30:58.7947181Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csr_matrix-False-float32] PASSED [ 82%]
2021-07-06T06:30:58.9060597Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csr_matrix-False-float64] PASSED [ 82%]
2021-07-06T06:30:59.0053152Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csc_matrix-True-int64] PASSED [ 82%]
2021-07-06T06:30:59.1081123Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csc_matrix-True-float32] PASSED [ 82%]
2021-07-06T06:30:59.2092419Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csc_matrix-True-float64] PASSED [ 82%]
2021-07-06T06:30:59.3132989Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csc_matrix-False-int64] PASSED [ 83%]
2021-07-06T06:30:59.4203029Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csc_matrix-False-float32] PASSED [ 83%]
2021-07-06T06:30:59.5293083Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell[csc_matrix-False-float64] PASSED [ 83%]
2021-07-06T06:30:59.6251325Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[<lambda>-True-int64] PASSED [ 83%]
2021-07-06T06:30:59.7115178Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[<lambda>-True-float32] PASSED [ 83%]
2021-07-06T06:30:59.7897579Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[<lambda>-True-float64] PASSED [ 83%]
2021-07-06T06:30:59.8891457Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[<lambda>-False-int64] PASSED [ 83%]
2021-07-06T06:30:59.9896017Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[<lambda>-False-float32] PASSED [ 84%]
2021-07-06T06:31:00.0895233Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[<lambda>-False-float64] PASSED [ 84%]
2021-07-06T06:31:00.1764058Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csr_matrix-True-int64] PASSED [ 84%]
2021-07-06T06:31:00.2684999Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csr_matrix-True-float32] PASSED [ 84%]
2021-07-06T06:31:00.3612092Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csr_matrix-True-float64] PASSED [ 84%]
2021-07-06T06:31:00.4573341Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csr_matrix-False-int64] PASSED [ 84%]
2021-07-06T06:31:00.5543792Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csr_matrix-False-float32] PASSED [ 84%]
2021-07-06T06:31:00.6521047Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csr_matrix-False-float64] PASSED [ 84%]
2021-07-06T06:31:00.7468336Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csc_matrix-True-int64] PASSED [ 85%]
2021-07-06T06:31:00.8340457Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csc_matrix-True-float32] PASSED [ 85%]
2021-07-06T06:31:00.9190108Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csc_matrix-True-float64] PASSED [ 85%]
2021-07-06T06:31:01.0110751Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csc_matrix-False-int64] PASSED [ 85%]
2021-07-06T06:31:01.1036050Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csc_matrix-False-float32] PASSED [ 85%]
2021-07-06T06:31:01.2009848Z scanpy/tests/test_preprocessing.py::test_downsample_counts_per_cell_multiple_targets[csc_matrix-False-float64] PASSED [ 85%]
2021-07-06T06:31:01.2333682Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[<lambda>-True-int64] PASSED [ 85%]
2021-07-06T06:31:01.2689236Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[<lambda>-True-float32] PASSED [ 86%]
2021-07-06T06:31:01.3039804Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[<lambda>-True-float64] PASSED [ 86%]
2021-07-06T06:31:01.3583410Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[<lambda>-False-int64] PASSED [ 86%]
2021-07-06T06:31:01.4133486Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[<lambda>-False-float32] PASSED [ 86%]
2021-07-06T06:31:01.4649309Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[<lambda>-False-float64] PASSED [ 86%]
2021-07-06T06:31:01.4965866Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csr_matrix-True-int64] PASSED [ 86%]
2021-07-06T06:31:01.5306519Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csr_matrix-True-float32] PASSED [ 86%]
2021-07-06T06:31:01.5633471Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csr_matrix-True-float64] PASSED [ 86%]
2021-07-06T06:31:01.6174406Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csr_matrix-False-int64] PASSED [ 87%]
2021-07-06T06:31:01.6816164Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csr_matrix-False-float32] PASSED [ 87%]
2021-07-06T06:31:01.7386515Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csr_matrix-False-float64] PASSED [ 87%]
2021-07-06T06:31:01.7742843Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csc_matrix-True-int64] PASSED [ 87%]
2021-07-06T06:31:01.8068499Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csc_matrix-True-float32] PASSED [ 87%]
2021-07-06T06:31:01.8412536Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csc_matrix-True-float64] PASSED [ 87%]
2021-07-06T06:31:01.9033439Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csc_matrix-False-int64] PASSED [ 87%]
2021-07-06T06:31:01.9594942Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csc_matrix-False-float32] PASSED [ 88%]
2021-07-06T06:31:02.0188893Z scanpy/tests/test_preprocessing.py::test_downsample_total_counts[csc_matrix-False-float64] PASSED [ 88%]
2021-07-06T06:31:02.2465196Z scanpy/tests/test_preprocessing.py::test_recipe_weinreb PASSED [ 88%]
2021-07-06T06:31:02.7739406Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_log1p[direct] PASSED [ 88%]
2021-07-06T06:31:03.2877989Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_log1p[dask] PASSED [ 88%]
2021-07-06T06:31:03.7484979Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_normalize_per_cell[direct] PASSED [ 88%]
2021-07-06T06:31:04.2992694Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_normalize_per_cell[dask] PASSED [ 88%]
2021-07-06T06:31:04.7225944Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_normalize_total[direct] PASSED [ 89%]
2021-07-06T06:31:05.1660453Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_normalize_total[dask] PASSED [ 89%]
2021-07-06T06:31:05.6281125Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_filter_cells[direct] PASSED [ 89%]
2021-07-06T06:31:06.1443934Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_filter_cells[dask] PASSED [ 89%]
2021-07-06T06:31:06.5527899Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_filter_genes[direct] PASSED [ 89%]
2021-07-06T06:31:06.9561873Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_filter_genes[dask] PASSED [ 89%]
2021-07-06T06:31:07.6255533Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_write_zarr[direct] PASSED [ 89%]
2021-07-06T06:31:08.2993160Z scanpy/tests/test_preprocessing_distributed.py::TestPreprocessingDistributed::test_write_zarr[dask] PASSED [ 89%]
2021-07-06T06:31:08.3063441Z scanpy/tests/test_qc_metrics.py::test_proportions[dense] PASSED [ 90%]
2021-07-06T06:31:08.3124079Z scanpy/tests/test_qc_metrics.py::test_proportions[sparse] PASSED [ 90%]
2021-07-06T06:31:08.3351345Z scanpy/tests/test_qc_metrics.py::test_segments_binary PASSED [ 90%]
2021-07-06T06:31:08.3518616Z scanpy/tests/test_qc_metrics.py::test_top_segments[asarray] PASSED [ 90%]
2021-07-06T06:31:16.0111496Z scanpy/tests/test_qc_metrics.py::test_top_segments[csr_matrix] FAILED [ 90%]
2021-07-06T06:31:18.5410379Z scanpy/tests/test_qc_metrics.py::test_top_segments[csc_matrix] FAILED [ 90%]
2021-07-06T06:31:21.0825832Z scanpy/tests/test_qc_metrics.py::test_top_segments[coo_matrix] FAILED [ 90%]
2021-07-06T06:31:27.2748909Z scanpy/tests/test_qc_metrics.py::test_qc_metrics FAILED [ 91%]
2021-07-06T06:31:27.4206705Z scanpy/tests/test_qc_metrics.py::test_qc_metrics_format[asarray] PASSED [ 91%]
2021-07-06T06:31:30.1227418Z scanpy/tests/test_qc_metrics.py::test_qc_metrics_format[csr_matrix] FAILED [ 91%]
2021-07-06T06:31:32.4752220Z scanpy/tests/test_qc_metrics.py::test_qc_metrics_format[csc_matrix] FAILED [ 91%]
2021-07-06T06:31:35.1070228Z scanpy/tests/test_qc_metrics.py::test_qc_metrics_format[coo_matrix] FAILED [ 91%]
2021-07-06T06:31:35.2485426Z scanpy/tests/test_qc_metrics.py::test_qc_metrics_percentage PASSED [ 91%]
2021-07-06T06:31:37.7940832Z scanpy/tests/test_qc_metrics.py::test_layer_raw FAILED [ 91%]
2021-07-06T06:31:40.3465971Z scanpy/tests/test_qc_metrics.py::test_inner_methods FAILED [ 92%]
2021-07-06T06:31:40.3478241Z scanpy/tests/test_queries.py::test_enrich SKIPPED (need --internet-t...) [ 92%]
2021-07-06T06:31:40.3540161Z scanpy/tests/test_queries.py::test_mito_genes SKIPPED (need --intern...) [ 92%]
2021-07-06T06:31:40.4451196Z scanpy/tests/test_rank_genes_groups.py::test_results_dense PASSED [ 92%]
2021-07-06T06:31:40.5411027Z scanpy/tests/test_rank_genes_groups.py::test_results_sparse PASSED [ 92%]
2021-07-06T06:31:40.7321594Z scanpy/tests/test_rank_genes_groups.py::test_results_layers PASSED [ 92%]
2021-07-06T06:31:40.8186968Z scanpy/tests/test_rank_genes_groups.py::test_singlets PASSED [ 92%]
2021-07-06T06:31:40.9061676Z scanpy/tests/test_rank_genes_groups.py::test_emptycat PASSED [ 92%]
2021-07-06T06:31:41.1837945Z scanpy/tests/test_rank_genes_groups.py::test_wilcoxon_symmetry PASSED [ 93%]
2021-07-06T06:31:41.5935259Z scanpy/tests/test_rank_genes_groups.py::test_wilcoxon_tie_correction[True] PASSED [ 93%]
2021-07-06T06:31:42.1804984Z scanpy/tests/test_rank_genes_groups.py::test_wilcoxon_tie_correction[False] PASSED [ 93%]
2021-07-06T06:31:43.4469148Z scanpy/tests/test_rank_genes_groups_logreg.py::test_rank_genes_groups_with_renamed_categories FAILED [ 93%]
2021-07-06T06:31:44.6897712Z scanpy/tests/test_rank_genes_groups_logreg.py::test_rank_genes_groups_with_renamed_categories_use_rep FAILED [ 93%]
2021-07-06T06:31:44.7642342Z scanpy/tests/test_read_10x.py::test_read_10x[None-mtx_path0-h5_path0] PASSED [ 93%]
2021-07-06T06:31:44.9892516Z scanpy/tests/test_read_10x.py::test_read_10x[None-mtx_path1-h5_path1] PASSED [ 93%]
2021-07-06T06:31:45.0605008Z scanpy/tests/test_read_10x.py::test_read_10x[prefix_-mtx_path0-h5_path0] PASSED [ 94%]
2021-07-06T06:31:45.3008634Z scanpy/tests/test_read_10x.py::test_read_10x[prefix_-mtx_path1-h5_path1] PASSED [ 94%]
2021-07-06T06:31:45.3361894Z scanpy/tests/test_read_10x.py::test_read_10x_h5_v1 PASSED [ 94%]
2021-07-06T06:31:45.4000459Z scanpy/tests/test_read_10x.py::test_read_10x_h5 PASSED [ 94%]
2021-07-06T06:31:45.4209562Z scanpy/tests/test_read_10x.py::test_error_10x_h5_legacy PASSED [ 94%]
2021-07-06T06:31:45.4473654Z scanpy/tests/test_read_10x.py::test_error_missing_genome PASSED [ 94%]
2021-07-06T06:31:45.4882302Z scanpy/tests/test_read_10x.py::test_read_visium_counts PASSED [ 94%]
2021-07-06T06:31:45.5438609Z scanpy/tests/test_read_10x.py::test_10x_h5_gex PASSED [ 94%]
2021-07-06T06:31:45.5456971Z scanpy/tests/test_readwrite.py::test_slugify[path0] PASSED [ 95%]
2021-07-06T06:31:45.5479049Z scanpy/tests/test_readwrite.py::test_slugify[path1] PASSED [ 95%]
2021-07-06T06:31:45.5497908Z scanpy/tests/test_readwrite.py::test_slugify[path2] PASSED [ 95%]
2021-07-06T06:31:45.5518158Z scanpy/tests/test_readwrite.py::test_slugify[path3] PASSED [ 95%]
2021-07-06T06:31:45.5537304Z scanpy/tests/test_readwrite.py::test_slugify[path4] PASSED [ 95%]
2021-07-06T06:31:45.5556167Z scanpy/tests/test_readwrite.py::test_slugify[path5] PASSED [ 95%]
2021-07-06T06:31:45.5712667Z scanpy/tests/test_scaling.py::test_scale[float32-array] PASSED [ 95%]
2021-07-06T06:31:45.5920510Z scanpy/tests/test_scaling.py::test_scale[float32-csr_matrix] PASSED [ 96%]
2021-07-06T06:31:45.6106169Z scanpy/tests/test_scaling.py::test_scale[int64-array] PASSED [ 96%]
2021-07-06T06:31:45.6360657Z scanpy/tests/test_scaling.py::test_scale[int64-csr_matrix] PASSED [ 96%]
2021-07-06T06:31:48.5186273Z scanpy/tests/test_score_genes.py::test_score_with_reference PASSED [ 96%]
2021-07-06T06:31:48.5727577Z scanpy/tests/test_score_genes.py::test_add_score PASSED [ 96%]
2021-07-06T06:31:48.5813830Z scanpy/tests/test_score_genes.py::test_sparse_nanmean PASSED [ 96%]
2021-07-06T06:31:48.5833655Z scanpy/tests/test_score_genes.py::test_sparse_nanmean_on_dense_matrix PASSED [ 96%]
2021-07-06T06:31:48.6501583Z scanpy/tests/test_score_genes.py::test_score_genes_sparse_vs_dense PASSED [ 97%]
2021-07-06T06:31:48.7087465Z scanpy/tests/test_score_genes.py::test_score_genes_deplete PASSED [ 97%]
2021-07-06T06:31:48.7728377Z scanpy/tests/test_score_genes.py::test_npnanmean_vs_sparsemean PASSED [ 97%]
2021-07-06T06:31:48.8068042Z scanpy/tests/test_score_genes.py::test_missing_genes PASSED [ 97%]
2021-07-06T06:31:48.8496645Z scanpy/tests/test_score_genes.py::test_one_gene PASSED [ 97%]
2021-07-06T06:31:48.8974845Z scanpy/tests/test_sim.py::test_sim_toggleswitch PASSED [ 97%]
2021-07-06T06:31:48.8994671Z scanpy/tests/test_utils.py::test_descend_classes_and_funcs PASSED [ 97%]
2021-07-06T06:31:48.9050249Z scanpy/tests/test_utils.py::test_check_nonnegative_integers PASSED [ 97%]
2021-07-06T06:31:48.9075144Z scanpy/tests/test_utils.py::test_is_constant[asarray] PASSED [ 98%]
2021-07-06T06:31:49.1942764Z scanpy/tests/test_utils.py::test_is_constant[csr_matrix] PASSED [ 98%]
2021-07-06T06:31:49.1981293Z scanpy/tests/test_utils.py::test_is_constant[csc_matrix] PASSED [ 98%]
2021-07-06T06:31:57.7694436Z scanpy/tests/external/test_harmony_integrate.py::test_harmony_integrate PASSED [ 98%]
2021-07-06T06:31:58.1575665Z scanpy/tests/external/test_hashsolo.py::test_cell_demultiplexing PASSED [ 98%]
2021-07-06T06:31:58.1745771Z scanpy/tests/external/test_magic.py::test_magic_default PASSED [ 98%]
2021-07-06T06:31:58.1900355Z scanpy/tests/external/test_magic.py::test_magic_pca_only PASSED [ 98%]
2021-07-06T06:31:58.2028352Z scanpy/tests/external/test_magic.py::test_magic_copy PASSED [ 99%]
2021-07-06T06:31:58.5780199Z scanpy/tests/external/test_scanorama_integrate.py::test_scanorama_integrate PASSED [ 99%]
2021-07-06T06:32:03.1951699Z scanpy/tests/external/test_scrublet.py::test_scrublet PASSED [ 99%]
2021-07-06T06:32:04.3085757Z scanpy/tests/external/test_scrublet.py::test_scrublet_dense PASSED [ 99%]
2021-07-06T06:32:07.8846343Z scanpy/tests/external/test_scrublet.py::test_scrublet_params PASSED [ 99%]
2021-07-06T06:32:08.8283664Z scanpy/tests/external/test_scrublet.py::test_scrublet_simulate_doublets PASSED [ 99%]
2021-07-06T06:32:10.9056664Z scanpy/tests/notebooks/test_paga_paul15_subsampled.py::test_paga_paul15_subsampled FAILED [ 99%]
2021-07-06T06:32:25.2438961Z scanpy/tests/notebooks/test_pbmc3k.py::test_pbmc3k FAILED [100%]
2021-07-06T06:32:25.2439869Z
2021-07-06T06:32:25.2440494Z ==================================== ERRORS ====================================
2021-07-06T06:32:25.2441517Z ____________________ ERROR at setup of test_representation _____________________
2021-07-06T06:32:25.2442042Z
2021-07-06T06:32:25.2443397Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.2444954Z kwargs = {'inst': id=0[LoopNest(index_variable = parfor_index.31, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/host...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.2446538Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.2447909Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.2450963Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...or_index.31, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.2451895Z tb = None
2021-07-06T06:32:25.2452130Z
2021-07-06T06:32:25.2452489Z @contextlib.contextmanager
2021-07-06T06:32:25.2453144Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.2453595Z """
2021-07-06T06:32:25.2454080Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.2454946Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.2455557Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.2456145Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.2456824Z constructor.
2021-07-06T06:32:25.2457176Z
2021-07-06T06:32:25.2457639Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.2458351Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.2459249Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.2459682Z """
2021-07-06T06:32:25.2460339Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.2460777Z
2021-07-06T06:32:25.2461524Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.2462430Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.2463334Z loc_info.update(kwargs)
2021-07-06T06:32:25.2463922Z
2021-07-06T06:32:25.2464300Z try:
2021-07-06T06:32:25.2465384Z > yield
2021-07-06T06:32:25.2465665Z
2021-07-06T06:32:25.2466494Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.2467209Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2467570Z
2021-07-06T06:32:25.2467991Z self = <numba.core.lowering.Lower object at 0x7f16abaca350>
2021-07-06T06:32:25.2468857Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.2469297Z
2021-07-06T06:32:25.2469721Z def lower_block(self, block):
2021-07-06T06:32:25.2471798Z """
2021-07-06T06:32:25.2472256Z Lower the given block.
2021-07-06T06:32:25.2472830Z """
2021-07-06T06:32:25.2473209Z self.pre_block(block)
2021-07-06T06:32:25.2473847Z for inst in block.body:
2021-07-06T06:32:25.2474414Z self.loc = inst.loc
2021-07-06T06:32:25.2476349Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.2477477Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.2480632Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.2481335Z > self.lower_inst(inst)
2021-07-06T06:32:25.2481702Z
2021-07-06T06:32:25.2482581Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.2483387Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2483817Z
2021-07-06T06:32:25.2484410Z self = <numba.core.lowering.Lower object at 0x7f16abaca350>
2021-07-06T06:32:25.2485970Z inst = id=0[LoopNest(index_variable = parfor_index.31, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.31, umap_.py:404)
2021-07-06T06:32:25.2487637Z
2021-07-06T06:32:25.2488302Z def lower_inst(self, inst):
2021-07-06T06:32:25.2488962Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.2489602Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.2490210Z self.debug_print(str(inst))
2021-07-06T06:32:25.2490774Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.2492407Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.2493015Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.2493609Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.2494119Z
2021-07-06T06:32:25.2494648Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.2495391Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.2497130Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.2498175Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.2498701Z
2021-07-06T06:32:25.2499212Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.2499869Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.2500583Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.2501255Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.2501756Z
2021-07-06T06:32:25.2502537Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.2503109Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.2503660Z self.builder.branch(target)
2021-07-06T06:32:25.2504126Z
2021-07-06T06:32:25.2505712Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.2508740Z if self.generator_info:
2021-07-06T06:32:25.2509344Z # StopIteration
2021-07-06T06:32:25.2509866Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.2510338Z return
2021-07-06T06:32:25.2510796Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.2511465Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.2511949Z ty = self.fndesc.restype
2021-07-06T06:32:25.2512426Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.2512947Z # If returning an optional type
2021-07-06T06:32:25.2513500Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.2514010Z return
2021-07-06T06:32:25.2515176Z assert ty == oty, (
2021-07-06T06:32:25.2516695Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.2517329Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.2517903Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.2518332Z
2021-07-06T06:32:25.2518803Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.2519309Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2519795Z assert signature is not None
2021-07-06T06:32:25.2520228Z try:
2021-07-06T06:32:25.2520972Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.2522385Z except NotImplementedError:
2021-07-06T06:32:25.2522959Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.2523508Z inst.value, signature)
2021-07-06T06:32:25.2523992Z else:
2021-07-06T06:32:25.2524443Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.2524967Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.2525461Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.2526006Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.2526563Z signature.args[2])
2021-07-06T06:32:25.2527117Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.2527589Z
2021-07-06T06:32:25.2528006Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.2528464Z self.lower_print(inst)
2021-07-06T06:32:25.2528861Z
2021-07-06T06:32:25.2529689Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.2530697Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2531231Z assert signature is not None
2021-07-06T06:32:25.2531770Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.2532291Z signature)
2021-07-06T06:32:25.2532715Z
2021-07-06T06:32:25.2533129Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.2533640Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2534104Z assert signature is not None
2021-07-06T06:32:25.2562435Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.2562836Z
2021-07-06T06:32:25.2563152Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.2563547Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.2563909Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.2564212Z
2021-07-06T06:32:25.2564500Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.2564864Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.2565165Z
2021-07-06T06:32:25.2566272Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2566727Z assert signature is not None
2021-07-06T06:32:25.2566998Z
2021-07-06T06:32:25.2567274Z op = operator.delitem
2021-07-06T06:32:25.2567637Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.2568032Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.2568414Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.2568739Z )
2021-07-06T06:32:25.2569428Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.2569720Z
2021-07-06T06:32:25.2570185Z assert targetty == signature.args[0]
2021-07-06T06:32:25.2570568Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.2570980Z signature.args[1])
2021-07-06T06:32:25.2571275Z
2021-07-06T06:32:25.2571582Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.2571873Z
2021-07-06T06:32:25.2572173Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.2572508Z self.delvar(inst.value)
2021-07-06T06:32:25.2572768Z
2021-07-06T06:32:25.2573076Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.2573446Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.2574275Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.2574655Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2574974Z
2021-07-06T06:32:25.2575258Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.2575637Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.2575976Z assert signature is not None
2021-07-06T06:32:25.2576315Z assert signature.args[0] == targetty
2021-07-06T06:32:25.2576712Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.2577019Z
2021-07-06T06:32:25.2577302Z # Convert argument to match
2021-07-06T06:32:25.2577670Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.2578085Z signature.args[1])
2021-07-06T06:32:25.2578536Z
2021-07-06T06:32:25.2578831Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.2579114Z
2021-07-06T06:32:25.2579401Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.2579770Z self.lower_static_raise(inst)
2021-07-06T06:32:25.2580032Z
2021-07-06T06:32:25.2580530Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.2580902Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.2581197Z
2021-07-06T06:32:25.2581424Z else:
2021-07-06T06:32:25.2581788Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.2582201Z if isinstance(inst, _class):
2021-07-06T06:32:25.2582755Z > func(self, inst)
2021-07-06T06:32:25.2582911Z
2021-07-06T06:32:25.2583774Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.2584319Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2585073Z
2021-07-06T06:32:25.2585440Z lowerer = <numba.core.lowering.Lower object at 0x7f16abaca350>
2021-07-06T06:32:25.2587229Z parfor = id=0[LoopNest(index_variable = parfor_index.31, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.31, umap_.py:404)
2021-07-06T06:32:25.2587782Z
2021-07-06T06:32:25.2588098Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.2588489Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.2588863Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.2589246Z The general approach is as follows:
2021-07-06T06:32:25.2589833Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.2590427Z in the context of the current function.
2021-07-06T06:32:25.2590825Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.2591281Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.2591716Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.2592159Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.2593497Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.2593919Z the final reduction values.
2021-07-06T06:32:25.2594198Z """
2021-07-06T06:32:25.2594527Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.2594830Z
2021-07-06T06:32:25.2595085Z ensure_parallel_support()
2021-07-06T06:32:25.2595438Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.2596103Z targetctx = lowerer.context
2021-07-06T06:32:25.2596819Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.2597281Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.2597693Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.2598109Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.2598551Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.2598917Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2599474Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.2599841Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.2600338Z varmap = lowerer.varmap
2021-07-06T06:32:25.2600756Z
2021-07-06T06:32:25.2601018Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2601591Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.2602053Z parfor.dump()
2021-07-06T06:32:25.2602307Z
2021-07-06T06:32:25.2602556Z loc = parfor.init_block.loc
2021-07-06T06:32:25.2602878Z scope = parfor.init_block.scope
2021-07-06T06:32:25.2603313Z
2021-07-06T06:32:25.2603588Z # produce instructions for init_block
2021-07-06T06:32:25.2603953Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2604354Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.2604806Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.2605177Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2605563Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.2605913Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.2606194Z
2021-07-06T06:32:25.2606470Z for racevar in parfor.races:
2021-07-06T06:32:25.2606838Z if racevar not in varmap:
2021-07-06T06:32:25.2607177Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.2607516Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.2608709Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.2609065Z
2021-07-06T06:32:25.2609549Z alias_map = {}
2021-07-06T06:32:25.2609974Z arg_aliases = {}
2021-07-06T06:32:25.2610521Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.2611328Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.2611742Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2612240Z print("alias_map", alias_map)
2021-07-06T06:32:25.2616941Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.2617244Z
2021-07-06T06:32:25.2617585Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.2618072Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.2618463Z assert parfor.params is not None
2021-07-06T06:32:25.2618751Z
2021-07-06T06:32:25.2619067Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.2619454Z parfor, parfor.params)
2021-07-06T06:32:25.2619844Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.2620336Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.2620731Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2621265Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.2621669Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.2621991Z
2021-07-06T06:32:25.2622395Z # init reduction array allocation here.
2021-07-06T06:32:25.2622732Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.2623041Z redarrs = {}
2021-07-06T06:32:25.2623321Z if nredvars > 0:
2021-07-06T06:32:25.2623701Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.2624084Z thread_count = get_thread_count()
2021-07-06T06:32:25.2624442Z scope = parfor.init_block.scope
2021-07-06T06:32:25.2624933Z loc = parfor.init_block.loc
2021-07-06T06:32:25.2625344Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.2625686Z
2021-07-06T06:32:25.2625960Z # For each reduction variable...
2021-07-06T06:32:25.2626333Z for i in range(nredvars):
2021-07-06T06:32:25.2626876Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.2627289Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.2627677Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.2628056Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.2628402Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2628847Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.2629198Z
2021-07-06T06:32:25.2629498Z # If this is reduction over an array,
2021-07-06T06:32:25.2630404Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.2631066Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.2631660Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.2632010Z else:
2021-07-06T06:32:25.2632307Z redarrdim = 1
2021-07-06T06:32:25.2632563Z
2021-07-06T06:32:25.2633089Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.2633615Z
2021-07-06T06:32:25.2634344Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.2634821Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.2635196Z fobj=np.empty,
2021-07-06T06:32:25.2635533Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.2635877Z args=(
2021-07-06T06:32:25.2636217Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.2637350Z types.DType(reddtype),
2021-07-06T06:32:25.2638681Z ),
2021-07-06T06:32:25.2638945Z )
2021-07-06T06:32:25.2639201Z
2021-07-06T06:32:25.2639564Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.2640052Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.2640409Z cval=thread_count,
2021-07-06T06:32:25.2640743Z typ=types.intp,
2021-07-06T06:32:25.2641757Z name='num_threads',
2021-07-06T06:32:25.2642240Z )
2021-07-06T06:32:25.2642466Z
2021-07-06T06:32:25.2642736Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.2643213Z
2021-07-06T06:32:25.2643507Z # If this is a reduction over an array...
2021-07-06T06:32:25.2643954Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.2644420Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.2645894Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.2646293Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.2646879Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.2647433Z name="redarr_shape",
2021-07-06T06:32:25.2647745Z )
2021-07-06T06:32:25.2647973Z
2021-07-06T06:32:25.2648345Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.2649015Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.2649406Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.2650162Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.2650717Z typ=types.intp,
2021-07-06T06:32:25.2651244Z name="redshapeonedim",
2021-07-06T06:32:25.2651570Z )
2021-07-06T06:32:25.2651914Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.2652209Z
2021-07-06T06:32:25.2652603Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.2653059Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.2653733Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.2654069Z )
2021-07-06T06:32:25.2654300Z
2021-07-06T06:32:25.2654624Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.2655037Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.2655374Z
2021-07-06T06:32:25.2655644Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.2656040Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.2656376Z )
2021-07-06T06:32:25.2656632Z
2021-07-06T06:32:25.2657256Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.2657752Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.2658037Z
2021-07-06T06:32:25.2658340Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.2659518Z if init_val is not None:
2021-07-06T06:32:25.2659962Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.2660453Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.2660879Z # First, create a variable for np.full.
2021-07-06T06:32:25.2661303Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.2661675Z fobj=np.full,
2021-07-06T06:32:25.2662056Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.2662568Z args=(
2021-07-06T06:32:25.2662962Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.2663351Z reddtype,
2021-07-06T06:32:25.2663705Z types.DType(reddtype),
2021-07-06T06:32:25.2664058Z ),
2021-07-06T06:32:25.2664341Z )
2021-07-06T06:32:25.2664810Z
2021-07-06T06:32:25.2665127Z # Then create a var with the identify value.
2021-07-06T06:32:25.2665562Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.2666366Z cval=init_val,
2021-07-06T06:32:25.2667142Z typ=reddtype,
2021-07-06T06:32:25.2667498Z name="init_val",
2021-07-06T06:32:25.2667826Z )
2021-07-06T06:32:25.2668069Z
2021-07-06T06:32:25.2668443Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.2668928Z full_call = pfbdr.call(
2021-07-06T06:32:25.2669325Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.2669934Z )
2021-07-06T06:32:25.2670178Z
2021-07-06T06:32:25.2670475Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.2670818Z rhs=full_call,
2021-07-06T06:32:25.2671171Z typ=redvar_typ,
2021-07-06T06:32:25.2671508Z name="redtoset",
2021-07-06T06:32:25.2671833Z )
2021-07-06T06:32:25.2672123Z else:
2021-07-06T06:32:25.2672472Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.2672859Z cval=init_val,
2021-07-06T06:32:25.2673190Z typ=reddtype,
2021-07-06T06:32:25.2673546Z name="redtoset",
2021-07-06T06:32:25.2673860Z )
2021-07-06T06:32:25.2674159Z else:
2021-07-06T06:32:25.2674460Z redtoset = redvar
2021-07-06T06:32:25.2674744Z
2021-07-06T06:32:25.2675059Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.2675546Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.2676057Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.2676377Z
2021-07-06T06:32:25.2676687Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.2677053Z cval=res_print_str,
2021-07-06T06:32:25.2677459Z typ=strconsttyp,
2021-07-06T06:32:25.2677805Z name="str_const",
2021-07-06T06:32:25.2678134Z )
2021-07-06T06:32:25.2678377Z
2021-07-06T06:32:25.2678698Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.2679109Z vararg=None, loc=loc)
2021-07-06T06:32:25.2679544Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.2680036Z typemap[lhs.name],
2021-07-06T06:32:25.2680507Z typemap[redvar.name])
2021-07-06T06:32:25.2680959Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.2681338Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.2681795Z
2021-07-06T06:32:25.2681994Z
2021-07-06T06:32:25.2682979Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.2683481Z for j in range(thread_count):
2021-07-06T06:32:25.2683888Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.2684410Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.2684769Z )
2021-07-06T06:32:25.2685127Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.2685484Z
2021-07-06T06:32:25.2685819Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.2686210Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.2686760Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.2687366Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.2687998Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.2688420Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.2688827Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.2689199Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.2690345Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.2690678Z try:
2021-07-06T06:32:25.2690941Z (func,
2021-07-06T06:32:25.2691350Z func_args,
2021-07-06T06:32:25.2691612Z func_sig,
2021-07-06T06:32:25.2691899Z redargstartdim,
2021-07-06T06:32:25.2692178Z func_arg_types,
2021-07-06T06:32:25.2692535Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.2692949Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.2693369Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.2693687Z finally:
2021-07-06T06:32:25.2694034Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.2694523Z
2021-07-06T06:32:25.2694797Z # get the shape signature
2021-07-06T06:32:25.2695726Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.2696088Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.2696708Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.2698062Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2698506Z print("func_args = ", func_args)
2021-07-06T06:32:25.2698851Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.2699241Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.2699623Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.2700015Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.2700375Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.2700726Z parfor.get_shape_classes,
2021-07-06T06:32:25.2701023Z num_inputs,
2021-07-06T06:32:25.2701299Z num_reductions,
2021-07-06T06:32:25.2701597Z func_args,
2021-07-06T06:32:25.2701872Z redargstartdim,
2021-07-06T06:32:25.2702179Z func_sig,
2021-07-06T06:32:25.2702611Z parfor.races,
2021-07-06T06:32:25.2702891Z typemap)
2021-07-06T06:32:25.2703181Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2703547Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.2703820Z
2021-07-06T06:32:25.2704136Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.2704739Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.2705136Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2705499Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.2705848Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.2706177Z call_parallel_gufunc(
2021-07-06T06:32:25.2706444Z lowerer,
2021-07-06T06:32:25.2706709Z func,
2021-07-06T06:32:25.2706963Z gu_signature,
2021-07-06T06:32:25.2707225Z func_sig,
2021-07-06T06:32:25.2707659Z func_args,
2021-07-06T06:32:25.2707925Z func_arg_types,
2021-07-06T06:32:25.2708214Z loop_ranges,
2021-07-06T06:32:25.2708482Z parfor_redvars,
2021-07-06T06:32:25.2708778Z parfor_reddict,
2021-07-06T06:32:25.2709221Z redarrs,
2021-07-06T06:32:25.2709515Z parfor.init_block,
2021-07-06T06:32:25.2709801Z index_var_typ,
2021-07-06T06:32:25.2710078Z parfor.races,
2021-07-06T06:32:25.2710388Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.2710543Z
2021-07-06T06:32:25.2711426Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.2711980Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2712211Z
2021-07-06T06:32:25.2712526Z lowerer = <numba.core.lowering.Lower object at 0x7f16abaca350>
2021-07-06T06:32:25.2713213Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16aba24810>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.2714203Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.2714760Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.2715391Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.2715856Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.2716264Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.2716923Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.2717445Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.2717651Z
2021-07-06T06:32:25.2717997Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.2718542Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.2719020Z exp_name_to_tuple_var):
2021-07-06T06:32:25.2719509Z '''
2021-07-06T06:32:25.2719848Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.2720325Z '''
2021-07-06T06:32:25.2720606Z context = lowerer.context
2021-07-06T06:32:25.2720908Z builder = lowerer.builder
2021-07-06T06:32:25.2721184Z
2021-07-06T06:32:25.2721492Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.2721894Z get_thread_count,
2021-07-06T06:32:25.2722244Z _launch_threads)
2021-07-06T06:32:25.2722553Z
2021-07-06T06:32:25.2722825Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2723177Z print("make_parallel_loop")
2021-07-06T06:32:25.2723553Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.2724124Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.2724469Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.2724800Z print("expr_args", expr_args)
2021-07-06T06:32:25.2725149Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.2725492Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.2725775Z
2021-07-06T06:32:25.2726029Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.2726582Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.2727007Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.2727390Z sin, sout = gu_signature
2021-07-06T06:32:25.2727646Z
2021-07-06T06:32:25.2727975Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.2728359Z > _launch_threads()
2021-07-06T06:32:25.2728593Z
2021-07-06T06:32:25.2729291Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.2729849Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2730079Z
2021-07-06T06:32:25.2730348Z def _launch_threads():
2021-07-06T06:32:25.2730688Z if not _backend_init_process_lock:
2021-07-06T06:32:25.2731054Z _set_init_process_lock()
2021-07-06T06:32:25.2731317Z
2021-07-06T06:32:25.2731620Z with _backend_init_process_lock:
2021-07-06T06:32:25.2731992Z with _backend_init_thread_lock:
2021-07-06T06:32:25.2732341Z global _is_initialized
2021-07-06T06:32:25.2732691Z if _is_initialized:
2021-07-06T06:32:25.2733006Z return
2021-07-06T06:32:25.2733272Z
2021-07-06T06:32:25.2733578Z def select_known_backend(backend):
2021-07-06T06:32:25.2733937Z """
2021-07-06T06:32:25.2734298Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.2734672Z """
2021-07-06T06:32:25.2735048Z lib = None
2021-07-06T06:32:25.2735396Z if backend.startswith("tbb"):
2021-07-06T06:32:25.2735776Z try:
2021-07-06T06:32:25.2736725Z # check if TBB is present and compatible
2021-07-06T06:32:25.2737596Z _check_tbb_version_compatible()
2021-07-06T06:32:25.2737952Z # now try and load the backend
2021-07-06T06:32:25.2738358Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.2738742Z except ImportError:
2021-07-06T06:32:25.2739089Z pass
2021-07-06T06:32:25.2739801Z elif backend.startswith("omp"):
2021-07-06T06:32:25.2740237Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.2740682Z # that understands GNU OMP might be present
2021-07-06T06:32:25.2741050Z try:
2021-07-06T06:32:25.2741409Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.2741793Z except ImportError:
2021-07-06T06:32:25.2742324Z pass
2021-07-06T06:32:25.2742692Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.2743136Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.2743494Z else:
2021-07-06T06:32:25.2743926Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.2744375Z raise ValueError(msg % backend)
2021-07-06T06:32:25.2749843Z return lib
2021-07-06T06:32:25.2750120Z
2021-07-06T06:32:25.2750449Z def select_from_backends(backends):
2021-07-06T06:32:25.2750807Z """
2021-07-06T06:32:25.2751170Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.2751569Z """
2021-07-06T06:32:25.2751851Z lib = None
2021-07-06T06:32:25.2752209Z for backend in backends:
2021-07-06T06:32:25.2752598Z lib = select_known_backend(backend)
2021-07-06T06:32:25.2753002Z if lib is not None:
2021-07-06T06:32:25.2753347Z break
2021-07-06T06:32:25.2753668Z else:
2021-07-06T06:32:25.2754677Z backend = ''
2021-07-06T06:32:25.2755091Z return lib, backend
2021-07-06T06:32:25.2755384Z
2021-07-06T06:32:25.2755674Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.2756368Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.2756685Z
2021-07-06T06:32:25.2757151Z lib = None
2021-07-06T06:32:25.2757449Z err_helpers = dict()
2021-07-06T06:32:25.2758093Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.2758562Z "$ conda/pip install tbb")
2021-07-06T06:32:25.2759241Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.2759934Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.2760492Z requirements = []
2021-07-06T06:32:25.2760742Z
2021-07-06T06:32:25.2761031Z def raise_with_hint(required):
2021-07-06T06:32:25.2761441Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.2761823Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.2762555Z if len(required) == 0:
2021-07-06T06:32:25.2763041Z hint = ''
2021-07-06T06:32:25.2763404Z if len(required) == 1:
2021-07-06T06:32:25.2763784Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.2764529Z if len(required) > 1:
2021-07-06T06:32:25.2766130Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.2767975Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.2768413Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.2768700Z
2021-07-06T06:32:25.2769002Z if t in namedbackends:
2021-07-06T06:32:25.2769410Z # Try and load the specific named backend
2021-07-06T06:32:25.2769808Z lib = select_known_backend(t)
2021-07-06T06:32:25.2770149Z if not lib:
2021-07-06T06:32:25.2770559Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.2770988Z # loading, set requirements for hinting
2021-07-06T06:32:25.2771675Z if t == 'tbb':
2021-07-06T06:32:25.2772226Z requirements.append('TBB')
2021-07-06T06:32:25.2772827Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.2773901Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.2774678Z libname = t
2021-07-06T06:32:25.2775384Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.2775821Z # User wants a specific behaviour...
2021-07-06T06:32:25.2776359Z available = ['tbb']
2021-07-06T06:32:25.2776864Z requirements.append('TBB')
2021-07-06T06:32:25.2777241Z if t == "safe":
2021-07-06T06:32:25.2777645Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.2778037Z pass
2021-07-06T06:32:25.2778371Z elif t == "threadsafe":
2021-07-06T06:32:25.2778766Z if _IS_OSX:
2021-07-06T06:32:25.2779470Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.2779875Z # omp is threadsafe everywhere
2021-07-06T06:32:25.2780569Z available.append('omp')
2021-07-06T06:32:25.2780938Z elif t == "forksafe":
2021-07-06T06:32:25.2781378Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.2781849Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.2782283Z # this to workqueue
2021-07-06T06:32:25.2782636Z if not _IS_LINUX:
2021-07-06T06:32:25.2783192Z available.append('omp')
2021-07-06T06:32:25.2784311Z if _IS_OSX:
2021-07-06T06:32:25.2786094Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.2786542Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.2787353Z available.append('workqueue')
2021-07-06T06:32:25.2787734Z else: # unreachable
2021-07-06T06:32:25.2788139Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.2788556Z raise ValueError(msg % t)
2021-07-06T06:32:25.2788907Z # select amongst available
2021-07-06T06:32:25.2789302Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.2789852Z elif t == 'default':
2021-07-06T06:32:25.2790441Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.2790797Z # workqueue
2021-07-06T06:32:25.2791164Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.2791527Z if not lib:
2021-07-06T06:32:25.2791882Z # set requirements for hinting
2021-07-06T06:32:25.2792411Z requirements.append('TBB')
2021-07-06T06:32:25.2793705Z if _IS_OSX:
2021-07-06T06:32:25.2794569Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.2795306Z else:
2021-07-06T06:32:25.2796131Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.2796547Z raise ValueError(msg % t)
2021-07-06T06:32:25.2796842Z
2021-07-06T06:32:25.2797120Z # No lib found, raise and hint
2021-07-06T06:32:25.2797465Z if not lib:
2021-07-06T06:32:25.2797800Z > raise_with_hint(requirements)
2021-07-06T06:32:25.2797980Z
2021-07-06T06:32:25.2798637Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.2799171Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2799433Z
2021-07-06T06:32:25.2801265Z required = ['TBB']
2021-07-06T06:32:25.2801429Z
2021-07-06T06:32:25.2802482Z def raise_with_hint(required):
2021-07-06T06:32:25.2802880Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.2804517Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.2806274Z if len(required) == 0:
2021-07-06T06:32:25.2807251Z hint = ''
2021-07-06T06:32:25.2807615Z if len(required) == 1:
2021-07-06T06:32:25.2807963Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.2808328Z if len(required) > 1:
2021-07-06T06:32:25.2808904Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.2809977Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.2810429Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.2811142Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.2811690Z E HINT:
2021-07-06T06:32:25.2812230Z E Intel TBB is required, try:
2021-07-06T06:32:25.2812792Z E $ conda/pip install tbb
2021-07-06T06:32:25.2812975Z
2021-07-06T06:32:25.2813641Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.2813962Z
2021-07-06T06:32:25.2815250Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.2815527Z
2021-07-06T06:32:25.2815790Z @pytest.fixture
2021-07-06T06:32:25.2816057Z def adatas():
2021-07-06T06:32:25.2816383Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.2816689Z n_split = 500
2021-07-06T06:32:25.2817102Z adata_ref = sc.AnnData(pbmc.X[:n_split, :], obs=pbmc.obs.iloc[:n_split])
2021-07-06T06:32:25.2817575Z adata_new = sc.AnnData(pbmc.X[n_split:, :])
2021-07-06T06:32:25.2817906Z
2021-07-06T06:32:25.2818153Z sc.pp.pca(adata_ref)
2021-07-06T06:32:25.2818594Z > sc.pp.neighbors(adata_ref)
2021-07-06T06:32:25.2818768Z
2021-07-06T06:32:25.2819443Z scanpy/tests/test_ingest.py:34:
2021-07-06T06:32:25.2819881Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2820474Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.2820841Z random_state=random_state,
2021-07-06T06:32:25.2821372Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.2821718Z self.n_neighbors,
2021-07-06T06:32:25.2822282Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.2822681Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.2823611Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.2824118Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.2825143Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.2825775Z raise e
2021-07-06T06:32:25.2826823Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.2827335Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.2828075Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.2828576Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.2829320Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.2829829Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.2830600Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.2831115Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.2832407Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.2832913Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.2834057Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.2834613Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.2835452Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.2835939Z return self._compile_bytecode()
2021-07-06T06:32:25.2836676Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.2837155Z return self._compile_core()
2021-07-06T06:32:25.2837869Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.2838321Z raise e
2021-07-06T06:32:25.2839144Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.2839612Z pm.run(self.state)
2021-07-06T06:32:25.2840274Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.2840928Z raise patched_exception
2021-07-06T06:32:25.2842012Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.2842585Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.2843420Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.2843937Z return func(*args, **kwargs)
2021-07-06T06:32:25.2845668Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.2846267Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.2847040Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.2847548Z mangled = func(compiler_state)
2021-07-06T06:32:25.2848248Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.2848749Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.2849606Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.2850273Z lower.lower()
2021-07-06T06:32:25.2851122Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.2851788Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.2852682Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.2853358Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.2854303Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.2854798Z self.lower_block(block)
2021-07-06T06:32:25.2855482Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.2855960Z self.lower_inst(inst)
2021-07-06T06:32:25.2856580Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.2857025Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.2857440Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2857675Z
2021-07-06T06:32:25.2858132Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.2859232Z kwargs = {'inst': id=0[LoopNest(index_variable = parfor_index.31, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/host...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.2860652Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.2862565Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.2863854Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...or_index.31, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.2864801Z tb = None
2021-07-06T06:32:25.2864976Z
2021-07-06T06:32:25.2865227Z @contextlib.contextmanager
2021-07-06T06:32:25.2865577Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.2865926Z """
2021-07-06T06:32:25.2866266Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.2866736Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.2867186Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.2867990Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.2868814Z constructor.
2021-07-06T06:32:25.2869097Z
2021-07-06T06:32:25.2869431Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.2869900Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.2870712Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.2871296Z """
2021-07-06T06:32:25.2871913Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.2872230Z
2021-07-06T06:32:25.2872682Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.2873103Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.2873532Z loc_info.update(kwargs)
2021-07-06T06:32:25.2873792Z
2021-07-06T06:32:25.2874037Z try:
2021-07-06T06:32:25.2874291Z yield
2021-07-06T06:32:25.2874581Z except NumbaError as e:
2021-07-06T06:32:25.2874955Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.2875272Z raise
2021-07-06T06:32:25.2875575Z except Exception as e:
2021-07-06T06:32:25.2875955Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.2876419Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.2876924Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.2877707Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.2878952Z E No threading layer could be loaded.
2021-07-06T06:32:25.2879672Z E HINT:
2021-07-06T06:32:25.2880229Z E Intel TBB is required, try:
2021-07-06T06:32:25.2880804Z E $ conda/pip install tbb
2021-07-06T06:32:25.2881275Z E 
2021-07-06T06:32:25.2882152Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.2882853Z E def compute_membership_strengths(
2021-07-06T06:32:25.2883359Z E <source elided>
2021-07-06T06:32:25.2884009Z E 
2021-07-06T06:32:25.2884737Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.2885277Z E ^
2021-07-06T06:32:25.2885698Z E 
2021-07-06T06:32:25.2887257Z E During: lowering "id=0[LoopNest(index_variable = parfor_index.31, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.31, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.2888046Z
2021-07-06T06:32:25.2888708Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.2889443Z ---------------------------- Captured stderr setup -----------------------------
2021-07-06T06:32:25.2889825Z computing PCA
2021-07-06T06:32:25.2890072Z with n_comps=50
2021-07-06T06:32:25.2890366Z finished (0:00:00)
2021-07-06T06:32:25.2890647Z computing neighbors
2021-07-06T06:32:25.2891083Z using 'X_pca' with n_pcs = 50
2021-07-06T06:32:25.2893288Z _______________________ ERROR at setup of test_neighbors _______________________
2021-07-06T06:32:25.2893584Z
2021-07-06T06:32:25.2894095Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.2895194Z kwargs = {'inst': id=4[LoopNest(index_variable = parfor_index.212, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hos...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.2896492Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.2897442Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.2898696Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...r_index.212, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.2899572Z tb = None
2021-07-06T06:32:25.2899708Z
2021-07-06T06:32:25.2899953Z @contextlib.contextmanager
2021-07-06T06:32:25.2900303Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.2900644Z """
2021-07-06T06:32:25.2900983Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.2901453Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.2901902Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.2902365Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.2902718Z constructor.
2021-07-06T06:32:25.2902973Z
2021-07-06T06:32:25.2903311Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.2903780Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.2904308Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.2906284Z """
2021-07-06T06:32:25.2907059Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.2907354Z
2021-07-06T06:32:25.2907784Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.2908450Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.2908880Z loc_info.update(kwargs)
2021-07-06T06:32:25.2909139Z
2021-07-06T06:32:25.2909386Z try:
2021-07-06T06:32:25.2909637Z > yield
2021-07-06T06:32:25.2909766Z
2021-07-06T06:32:25.2910402Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.2910925Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2911165Z
2021-07-06T06:32:25.2911479Z self = <numba.core.lowering.Lower object at 0x7f16ad673b10>
2021-07-06T06:32:25.2912184Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.2912485Z
2021-07-06T06:32:25.2912756Z def lower_block(self, block):
2021-07-06T06:32:25.2913475Z """
2021-07-06T06:32:25.2913768Z Lower the given block.
2021-07-06T06:32:25.2914030Z """
2021-07-06T06:32:25.2914310Z self.pre_block(block)
2021-07-06T06:32:25.2914618Z for inst in block.body:
2021-07-06T06:32:25.2914950Z self.loc = inst.loc
2021-07-06T06:32:25.2915300Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.2915984Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.2916470Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.2916908Z > self.lower_inst(inst)
2021-07-06T06:32:25.2917068Z
2021-07-06T06:32:25.2917683Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.2918234Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2918463Z
2021-07-06T06:32:25.2919115Z self = <numba.core.lowering.Lower object at 0x7f16ad673b10>
2021-07-06T06:32:25.2921693Z inst = id=4[LoopNest(index_variable = parfor_index.212, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.212, umap_.py:404)
2021-07-06T06:32:25.2922652Z
2021-07-06T06:32:25.2923006Z def lower_inst(self, inst):
2021-07-06T06:32:25.2923377Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.2924103Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.2924812Z self.debug_print(str(inst))
2021-07-06T06:32:25.2925138Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.2926725Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.2927162Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.2927536Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.2927818Z
2021-07-06T06:32:25.2928128Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.2928488Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.2928848Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.2929179Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.2929450Z
2021-07-06T06:32:25.2929751Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.2930151Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.2930654Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.2931092Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.2931388Z
2021-07-06T06:32:25.2931673Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.2932230Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.2932564Z self.builder.branch(target)
2021-07-06T06:32:25.2932848Z
2021-07-06T06:32:25.2933137Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.2933496Z if self.generator_info:
2021-07-06T06:32:25.2933836Z # StopIteration
2021-07-06T06:32:25.2934174Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.2934519Z return
2021-07-06T06:32:25.2934827Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.2935193Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.2935521Z ty = self.fndesc.restype
2021-07-06T06:32:25.2936298Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.2936673Z # If returning an optional type
2021-07-06T06:32:25.2937079Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.2937621Z return
2021-07-06T06:32:25.2938068Z assert ty == oty, (
2021-07-06T06:32:25.2938772Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.2939386Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.2940027Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.2940332Z
2021-07-06T06:32:25.2940654Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.2941037Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2941403Z assert signature is not None
2021-07-06T06:32:25.2941702Z try:
2021-07-06T06:32:25.2942263Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.2942701Z except NotImplementedError:
2021-07-06T06:32:25.2943101Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.2943536Z inst.value, signature)
2021-07-06T06:32:25.2943876Z else:
2021-07-06T06:32:25.2944216Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.2944756Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.2945156Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.2945555Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.2945987Z signature.args[2])
2021-07-06T06:32:25.2947037Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.2947459Z
2021-07-06T06:32:25.2947927Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.2948253Z self.lower_print(inst)
2021-07-06T06:32:25.2948679Z
2021-07-06T06:32:25.2949111Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.2949477Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2949797Z assert signature is not None
2021-07-06T06:32:25.2950367Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.2950751Z signature)
2021-07-06T06:32:25.2951040Z
2021-07-06T06:32:25.2951324Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.2951700Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2952033Z assert signature is not None
2021-07-06T06:32:25.2952406Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.2952747Z
2021-07-06T06:32:25.2953028Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.2953400Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.2954155Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.2954483Z
2021-07-06T06:32:25.2954759Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.2955132Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.2955555Z
2021-07-06T06:32:25.2955829Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2957084Z assert signature is not None
2021-07-06T06:32:25.2957532Z
2021-07-06T06:32:25.2957973Z op = operator.delitem
2021-07-06T06:32:25.2958335Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.2959323Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.2959932Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.2960277Z )
2021-07-06T06:32:25.2960610Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.2960929Z
2021-07-06T06:32:25.2961209Z assert targetty == signature.args[0]
2021-07-06T06:32:25.2961591Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.2962018Z signature.args[1])
2021-07-06T06:32:25.2962311Z
2021-07-06T06:32:25.2962623Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.2962914Z
2021-07-06T06:32:25.2963213Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.2963547Z self.delvar(inst.value)
2021-07-06T06:32:25.2963824Z
2021-07-06T06:32:25.2964112Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.2964480Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.2964855Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.2965209Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.2965509Z
2021-07-06T06:32:25.2966127Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.2966508Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.2967010Z assert signature is not None
2021-07-06T06:32:25.2967392Z assert signature.args[0] == targetty
2021-07-06T06:32:25.2967756Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.2968424Z
2021-07-06T06:32:25.2968857Z # Convert argument to match
2021-07-06T06:32:25.2969948Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.2970390Z signature.args[1])
2021-07-06T06:32:25.2970683Z
2021-07-06T06:32:25.2970990Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.2971279Z
2021-07-06T06:32:25.2971596Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.2971956Z self.lower_static_raise(inst)
2021-07-06T06:32:25.2972243Z
2021-07-06T06:32:25.2972547Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.2972919Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.2973215Z
2021-07-06T06:32:25.2973443Z else:
2021-07-06T06:32:25.2973965Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.2974378Z if isinstance(inst, _class):
2021-07-06T06:32:25.2974755Z > func(self, inst)
2021-07-06T06:32:25.2974913Z
2021-07-06T06:32:25.2975667Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.2976222Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.2976452Z
2021-07-06T06:32:25.2976744Z lowerer = <numba.core.lowering.Lower object at 0x7f16ad673b10>
2021-07-06T06:32:25.2978840Z parfor = id=4[LoopNest(index_variable = parfor_index.212, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.212, umap_.py:404)
2021-07-06T06:32:25.2979427Z
2021-07-06T06:32:25.2979795Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.2980228Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.2980637Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.2981169Z The general approach is as follows:
2021-07-06T06:32:25.2981826Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.2982228Z in the context of the current function.
2021-07-06T06:32:25.2982634Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.2983139Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.2983565Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.2984004Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.2984435Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.2985065Z the final reduction values.
2021-07-06T06:32:25.2985346Z """
2021-07-06T06:32:25.2985685Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.2985989Z
2021-07-06T06:32:25.2986261Z ensure_parallel_support()
2021-07-06T06:32:25.2986598Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.2986933Z targetctx = lowerer.context
2021-07-06T06:32:25.2987569Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.2988470Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.2989279Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.2989714Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.2990159Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.2990520Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2990926Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.2991306Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.2991986Z varmap = lowerer.varmap
2021-07-06T06:32:25.2992316Z
2021-07-06T06:32:25.2992616Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2992968Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.2993276Z parfor.dump()
2021-07-06T06:32:25.2993539Z
2021-07-06T06:32:25.2993799Z loc = parfor.init_block.loc
2021-07-06T06:32:25.2994135Z scope = parfor.init_block.scope
2021-07-06T06:32:25.2994401Z
2021-07-06T06:32:25.2994694Z # produce instructions for init_block
2021-07-06T06:32:25.2995036Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2995457Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.2995884Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.2996253Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.2996638Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.2997150Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.2997432Z
2021-07-06T06:32:25.2997708Z for racevar in parfor.races:
2021-07-06T06:32:25.2998078Z if racevar not in varmap:
2021-07-06T06:32:25.2998424Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.2998781Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.2999137Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.2999597Z
2021-07-06T06:32:25.2999826Z alias_map = {}
2021-07-06T06:32:25.3000087Z arg_aliases = {}
2021-07-06T06:32:25.3000629Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.3001074Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.3001467Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3001779Z print("alias_map", alias_map)
2021-07-06T06:32:25.3002285Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.3002813Z
2021-07-06T06:32:25.3003169Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.3003634Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.3004130Z assert parfor.params is not None
2021-07-06T06:32:25.3004400Z
2021-07-06T06:32:25.3004716Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.3005102Z parfor, parfor.params)
2021-07-06T06:32:25.3005488Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.3005962Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.3006355Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3006742Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.3007142Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.3007464Z
2021-07-06T06:32:25.3007747Z # init reduction array allocation here.
2021-07-06T06:32:25.3008099Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.3008391Z redarrs = {}
2021-07-06T06:32:25.3008676Z if nredvars > 0:
2021-07-06T06:32:25.3009054Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.3009747Z thread_count = get_thread_count()
2021-07-06T06:32:25.3010080Z scope = parfor.init_block.scope
2021-07-06T06:32:25.3010386Z loc = parfor.init_block.loc
2021-07-06T06:32:25.3010766Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.3011075Z
2021-07-06T06:32:25.3011527Z # For each reduction variable...
2021-07-06T06:32:25.3011861Z for i in range(nredvars):
2021-07-06T06:32:25.3012250Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.3012647Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.3013040Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.3013423Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.3013772Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3014216Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.3014567Z
2021-07-06T06:32:25.3014861Z # If this is reduction over an array,
2021-07-06T06:32:25.3016179Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.3016679Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3017096Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.3017492Z else:
2021-07-06T06:32:25.3017787Z redarrdim = 1
2021-07-06T06:32:25.3018060Z
2021-07-06T06:32:25.3018410Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.3018863Z
2021-07-06T06:32:25.3019186Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.3019581Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.3019952Z fobj=np.empty,
2021-07-06T06:32:25.3020438Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.3020953Z args=(
2021-07-06T06:32:25.3021294Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.3021682Z types.DType(reddtype),
2021-07-06T06:32:25.3021988Z ),
2021-07-06T06:32:25.3022248Z )
2021-07-06T06:32:25.3022498Z
2021-07-06T06:32:25.3022860Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.3023335Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3023693Z cval=thread_count,
2021-07-06T06:32:25.3024029Z typ=types.intp,
2021-07-06T06:32:25.3025079Z name='num_threads',
2021-07-06T06:32:25.3026266Z )
2021-07-06T06:32:25.3026646Z
2021-07-06T06:32:25.3026948Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.3027231Z
2021-07-06T06:32:25.3027525Z # If this is a reduction over an array...
2021-07-06T06:32:25.3028328Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3028932Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.3029342Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.3029709Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.3030131Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.3030502Z name="redarr_shape",
2021-07-06T06:32:25.3031021Z )
2021-07-06T06:32:25.3031267Z
2021-07-06T06:32:25.3032070Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.3032573Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.3032958Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.3033385Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.3033785Z typ=types.intp,
2021-07-06T06:32:25.3034151Z name="redshapeonedim",
2021-07-06T06:32:25.3034469Z )
2021-07-06T06:32:25.3034814Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.3035105Z
2021-07-06T06:32:25.3035496Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.3035953Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.3036629Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.3036966Z )
2021-07-06T06:32:25.3037216Z
2021-07-06T06:32:25.3037521Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.3037940Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.3038300Z
2021-07-06T06:32:25.3038569Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.3038965Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.3039302Z )
2021-07-06T06:32:25.3039550Z
2021-07-06T06:32:25.3040166Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.3040656Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.3040940Z
2021-07-06T06:32:25.3041393Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.3041781Z if init_val is not None:
2021-07-06T06:32:25.3042295Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3042769Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.3043187Z # First, create a variable for np.full.
2021-07-06T06:32:25.3043596Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.3043955Z fobj=np.full,
2021-07-06T06:32:25.3044325Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.3044661Z args=(
2021-07-06T06:32:25.3045038Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.3045411Z reddtype,
2021-07-06T06:32:25.3045768Z types.DType(reddtype),
2021-07-06T06:32:25.3046290Z ),
2021-07-06T06:32:25.3046595Z )
2021-07-06T06:32:25.3046846Z
2021-07-06T06:32:25.3047157Z # Then create a var with the identify value.
2021-07-06T06:32:25.3047589Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3048030Z cval=init_val,
2021-07-06T06:32:25.3048381Z typ=reddtype,
2021-07-06T06:32:25.3048717Z name="init_val",
2021-07-06T06:32:25.3049043Z )
2021-07-06T06:32:25.3049520Z
2021-07-06T06:32:25.3049896Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.3050378Z full_call = pfbdr.call(
2021-07-06T06:32:25.3050766Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.3051135Z )
2021-07-06T06:32:25.3051370Z
2021-07-06T06:32:25.3051833Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.3052181Z rhs=full_call,
2021-07-06T06:32:25.3052533Z typ=redvar_typ,
2021-07-06T06:32:25.3052868Z name="redtoset",
2021-07-06T06:32:25.3053199Z )
2021-07-06T06:32:25.3053487Z else:
2021-07-06T06:32:25.3053850Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.3054214Z cval=init_val,
2021-07-06T06:32:25.3054543Z typ=reddtype,
2021-07-06T06:32:25.3054893Z name="redtoset",
2021-07-06T06:32:25.3055201Z )
2021-07-06T06:32:25.3055654Z else:
2021-07-06T06:32:25.3055944Z redtoset = redvar
2021-07-06T06:32:25.3056214Z
2021-07-06T06:32:25.3056516Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.3057003Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.3057483Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.3057811Z
2021-07-06T06:32:25.3058090Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.3058444Z cval=res_print_str,
2021-07-06T06:32:25.3058792Z typ=strconsttyp,
2021-07-06T06:32:25.3059291Z name="str_const",
2021-07-06T06:32:25.3059596Z )
2021-07-06T06:32:25.3059820Z
2021-07-06T06:32:25.3060122Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.3060499Z vararg=None, loc=loc)
2021-07-06T06:32:25.3060921Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.3061353Z typemap[lhs.name],
2021-07-06T06:32:25.3061808Z typemap[redvar.name])
2021-07-06T06:32:25.3062506Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.3063088Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.3063362Z
2021-07-06T06:32:25.3063554Z
2021-07-06T06:32:25.3064190Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.3065384Z for j in range(thread_count):
2021-07-06T06:32:25.3065946Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3066317Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.3066649Z )
2021-07-06T06:32:25.3067344Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.3067697Z
2021-07-06T06:32:25.3068032Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.3068450Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.3068984Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.3069584Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.3071334Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.3071791Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.3072218Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.3072605Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.3073026Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.3073350Z try:
2021-07-06T06:32:25.3073619Z (func,
2021-07-06T06:32:25.3073883Z func_args,
2021-07-06T06:32:25.3074170Z func_sig,
2021-07-06T06:32:25.3074448Z redargstartdim,
2021-07-06T06:32:25.3074734Z func_arg_types,
2021-07-06T06:32:25.3075121Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.3075547Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.3075986Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.3076474Z finally:
2021-07-06T06:32:25.3076821Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.3077121Z
2021-07-06T06:32:25.3077386Z # get the shape signature
2021-07-06T06:32:25.3077957Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.3078315Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.3078892Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.3079287Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3079636Z print("func_args = ", func_args)
2021-07-06T06:32:25.3079966Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.3081383Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.3081800Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.3082193Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.3082557Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.3082911Z parfor.get_shape_classes,
2021-07-06T06:32:25.3083962Z num_inputs,
2021-07-06T06:32:25.3084282Z num_reductions,
2021-07-06T06:32:25.3084561Z func_args,
2021-07-06T06:32:25.3084838Z redargstartdim,
2021-07-06T06:32:25.3085132Z func_sig,
2021-07-06T06:32:25.3085403Z parfor.races,
2021-07-06T06:32:25.3085690Z typemap)
2021-07-06T06:32:25.3085991Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3086359Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.3086645Z
2021-07-06T06:32:25.3086989Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.3087608Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.3088000Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3088381Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.3088741Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.3089080Z call_parallel_gufunc(
2021-07-06T06:32:25.3089353Z lowerer,
2021-07-06T06:32:25.3089629Z func,
2021-07-06T06:32:25.3089893Z gu_signature,
2021-07-06T06:32:25.3090181Z func_sig,
2021-07-06T06:32:25.3090801Z func_args,
2021-07-06T06:32:25.3091078Z func_arg_types,
2021-07-06T06:32:25.3091375Z loop_ranges,
2021-07-06T06:32:25.3091652Z parfor_redvars,
2021-07-06T06:32:25.3091953Z parfor_reddict,
2021-07-06T06:32:25.3092223Z redarrs,
2021-07-06T06:32:25.3092520Z parfor.init_block,
2021-07-06T06:32:25.3092808Z index_var_typ,
2021-07-06T06:32:25.3093108Z parfor.races,
2021-07-06T06:32:25.3093400Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.3093555Z
2021-07-06T06:32:25.3094427Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.3094983Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3095212Z
2021-07-06T06:32:25.3096263Z lowerer = <numba.core.lowering.Lower object at 0x7f16ad673b10>
2021-07-06T06:32:25.3096974Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16b3be3e90>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.3097928Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.3098491Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.3099122Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.3099597Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.3100174Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.3101295Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.3101826Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.3102027Z
2021-07-06T06:32:25.3102361Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.3103057Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.3103539Z exp_name_to_tuple_var):
2021-07-06T06:32:25.3104192Z '''
2021-07-06T06:32:25.3104664Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.3105169Z '''
2021-07-06T06:32:25.3105805Z context = lowerer.context
2021-07-06T06:32:25.3106117Z builder = lowerer.builder
2021-07-06T06:32:25.3106365Z
2021-07-06T06:32:25.3106662Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.3107053Z get_thread_count,
2021-07-06T06:32:25.3107389Z _launch_threads)
2021-07-06T06:32:25.3107677Z
2021-07-06T06:32:25.3107939Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3108280Z print("make_parallel_loop")
2021-07-06T06:32:25.3108640Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.3109201Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.3109559Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.3109915Z print("expr_args", expr_args)
2021-07-06T06:32:25.3110261Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.3110614Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.3111068Z
2021-07-06T06:32:25.3111333Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.3111716Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.3112146Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.3112533Z sin, sout = gu_signature
2021-07-06T06:32:25.3112789Z
2021-07-06T06:32:25.3113136Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.3113503Z > _launch_threads()
2021-07-06T06:32:25.3113641Z
2021-07-06T06:32:25.3114346Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.3114895Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3115124Z
2021-07-06T06:32:25.3115395Z def _launch_threads():
2021-07-06T06:32:25.3115736Z if not _backend_init_process_lock:
2021-07-06T06:32:25.3116105Z _set_init_process_lock()
2021-07-06T06:32:25.3116368Z
2021-07-06T06:32:25.3116673Z with _backend_init_process_lock:
2021-07-06T06:32:25.3117149Z with _backend_init_thread_lock:
2021-07-06T06:32:25.3117519Z global _is_initialized
2021-07-06T06:32:25.3118023Z if _is_initialized:
2021-07-06T06:32:25.3118324Z return
2021-07-06T06:32:25.3118578Z
2021-07-06T06:32:25.3118872Z def select_known_backend(backend):
2021-07-06T06:32:25.3119217Z """
2021-07-06T06:32:25.3119561Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.3119926Z """
2021-07-06T06:32:25.3120199Z lib = None
2021-07-06T06:32:25.3120552Z if backend.startswith("tbb"):
2021-07-06T06:32:25.3120899Z try:
2021-07-06T06:32:25.3121251Z # check if TBB is present and compatible
2021-07-06T06:32:25.3121847Z _check_tbb_version_compatible()
2021-07-06T06:32:25.3122237Z # now try and load the backend
2021-07-06T06:32:25.3122663Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.3123063Z except ImportError:
2021-07-06T06:32:25.3123421Z pass
2021-07-06T06:32:25.3123927Z elif backend.startswith("omp"):
2021-07-06T06:32:25.3124371Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.3124801Z # that understands GNU OMP might be present
2021-07-06T06:32:25.3125171Z try:
2021-07-06T06:32:25.3125527Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.3125929Z except ImportError:
2021-07-06T06:32:25.3126255Z pass
2021-07-06T06:32:25.3127344Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.3127814Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.3128170Z else:
2021-07-06T06:32:25.3128763Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.3129215Z raise ValueError(msg % backend)
2021-07-06T06:32:25.3129572Z return lib
2021-07-06T06:32:25.3130028Z
2021-07-06T06:32:25.3130332Z def select_from_backends(backends):
2021-07-06T06:32:25.3131048Z """
2021-07-06T06:32:25.3131417Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.3131958Z """
2021-07-06T06:32:25.3154517Z lib = None
2021-07-06T06:32:25.3154926Z for backend in backends:
2021-07-06T06:32:25.3155321Z lib = select_known_backend(backend)
2021-07-06T06:32:25.3155910Z if lib is not None:
2021-07-06T06:32:25.3156254Z break
2021-07-06T06:32:25.3156583Z else:
2021-07-06T06:32:25.3157221Z backend = ''
2021-07-06T06:32:25.3157580Z return lib, backend
2021-07-06T06:32:25.3157849Z
2021-07-06T06:32:25.3158140Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.3158736Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.3159048Z
2021-07-06T06:32:25.3159311Z lib = None
2021-07-06T06:32:25.3159764Z err_helpers = dict()
2021-07-06T06:32:25.3160356Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.3160799Z "$ conda/pip install tbb")
2021-07-06T06:32:25.3161453Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.3162123Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.3162750Z requirements = []
2021-07-06T06:32:25.3163125Z
2021-07-06T06:32:25.3163428Z def raise_with_hint(required):
2021-07-06T06:32:25.3164006Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.3164572Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.3164963Z if len(required) == 0:
2021-07-06T06:32:25.3165487Z hint = ''
2021-07-06T06:32:25.3166008Z if len(required) == 1:
2021-07-06T06:32:25.3166578Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.3166987Z if len(required) > 1:
2021-07-06T06:32:25.3167606Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.3168110Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.3168683Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.3168975Z
2021-07-06T06:32:25.3169745Z if t in namedbackends:
2021-07-06T06:32:25.3170136Z # Try and load the specific named backend
2021-07-06T06:32:25.3170525Z lib = select_known_backend(t)
2021-07-06T06:32:25.3171769Z if not lib:
2021-07-06T06:32:25.3172256Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.3172684Z # loading, set requirements for hinting
2021-07-06T06:32:25.3173363Z if t == 'tbb':
2021-07-06T06:32:25.3173918Z requirements.append('TBB')
2021-07-06T06:32:25.3174519Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.3175103Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3175473Z libname = t
2021-07-06T06:32:25.3176045Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.3176472Z # User wants a specific behaviour...
2021-07-06T06:32:25.3177893Z available = ['tbb']
2021-07-06T06:32:25.3178431Z requirements.append('TBB')
2021-07-06T06:32:25.3178812Z if t == "safe":
2021-07-06T06:32:25.3179213Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.3179605Z pass
2021-07-06T06:32:25.3179937Z elif t == "threadsafe":
2021-07-06T06:32:25.3180318Z if _IS_OSX:
2021-07-06T06:32:25.3180868Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3181278Z # omp is threadsafe everywhere
2021-07-06T06:32:25.3181806Z available.append('omp')
2021-07-06T06:32:25.3182194Z elif t == "forksafe":
2021-07-06T06:32:25.3182617Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.3183258Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.3183688Z # this to workqueue
2021-07-06T06:32:25.3184040Z if not _IS_LINUX:
2021-07-06T06:32:25.3184812Z available.append('omp')
2021-07-06T06:32:25.3185196Z if _IS_OSX:
2021-07-06T06:32:25.3185774Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3186170Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.3186739Z available.append('workqueue')
2021-07-06T06:32:25.3187113Z else: # unreachable
2021-07-06T06:32:25.3187527Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.3187926Z raise ValueError(msg % t)
2021-07-06T06:32:25.3188302Z # select amongst available
2021-07-06T06:32:25.3188679Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.3189224Z elif t == 'default':
2021-07-06T06:32:25.3189770Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.3190139Z # workqueue
2021-07-06T06:32:25.3191289Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.3191670Z if not lib:
2021-07-06T06:32:25.3192043Z # set requirements for hinting
2021-07-06T06:32:25.3192688Z requirements.append('TBB')
2021-07-06T06:32:25.3193081Z if _IS_OSX:
2021-07-06T06:32:25.3193626Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3193992Z else:
2021-07-06T06:32:25.3194568Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.3194998Z raise ValueError(msg % t)
2021-07-06T06:32:25.3195298Z
2021-07-06T06:32:25.3195577Z # No lib found, raise and hint
2021-07-06T06:32:25.3195930Z if not lib:
2021-07-06T06:32:25.3196264Z > raise_with_hint(requirements)
2021-07-06T06:32:25.3196445Z
2021-07-06T06:32:25.3197097Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.3197630Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3197879Z
2021-07-06T06:32:25.3198248Z required = ['TBB']
2021-07-06T06:32:25.3198384Z
2021-07-06T06:32:25.3198679Z def raise_with_hint(required):
2021-07-06T06:32:25.3199046Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.3199995Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.3200337Z if len(required) == 0:
2021-07-06T06:32:25.3200860Z hint = ''
2021-07-06T06:32:25.3201375Z if len(required) == 1:
2021-07-06T06:32:25.3201722Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.3202086Z if len(required) > 1:
2021-07-06T06:32:25.3202665Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.3203451Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.3204185Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.3204783Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.3205313Z E HINT:
2021-07-06T06:32:25.3205853Z E Intel TBB is required, try:
2021-07-06T06:32:25.3206394Z E $ conda/pip install tbb
2021-07-06T06:32:25.3206568Z
2021-07-06T06:32:25.3207241Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.3207558Z
2021-07-06T06:32:25.3208107Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.3208556Z
2021-07-06T06:32:25.3208794Z @pytest.fixture
2021-07-06T06:32:25.3209058Z def adatas():
2021-07-06T06:32:25.3209798Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.3210115Z n_split = 500
2021-07-06T06:32:25.3210534Z adata_ref = sc.AnnData(pbmc.X[:n_split, :], obs=pbmc.obs.iloc[:n_split])
2021-07-06T06:32:25.3211008Z adata_new = sc.AnnData(pbmc.X[n_split:, :])
2021-07-06T06:32:25.3211343Z
2021-07-06T06:32:25.3211592Z sc.pp.pca(adata_ref)
2021-07-06T06:32:25.3211909Z > sc.pp.neighbors(adata_ref)
2021-07-06T06:32:25.3212066Z
2021-07-06T06:32:25.3212588Z scanpy/tests/test_ingest.py:34:
2021-07-06T06:32:25.3213030Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3213649Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.3214029Z random_state=random_state,
2021-07-06T06:32:25.3214592Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.3214972Z self.n_neighbors,
2021-07-06T06:32:25.3215536Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.3216074Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.3216835Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.3217342Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.3218117Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.3218568Z raise e
2021-07-06T06:32:25.3219266Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.3219773Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.3220691Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.3221173Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.3221894Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.3222385Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.3223322Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.3224257Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.3225314Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.3225813Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.3226737Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.3227218Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.3227925Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.3228391Z return self._compile_bytecode()
2021-07-06T06:32:25.3229093Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.3229552Z return self._compile_core()
2021-07-06T06:32:25.3230239Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.3230658Z raise e
2021-07-06T06:32:25.3231293Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.3231752Z pm.run(self.state)
2021-07-06T06:32:25.3232411Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.3233242Z raise patched_exception
2021-07-06T06:32:25.3233973Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.3234489Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.3235230Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.3235741Z return func(*args, **kwargs)
2021-07-06T06:32:25.3236454Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.3237039Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.3237790Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.3238850Z mangled = func(compiler_state)
2021-07-06T06:32:25.3239536Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.3240318Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.3241183Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.3241638Z lower.lower()
2021-07-06T06:32:25.3242271Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.3242752Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.3243464Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.3243978Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.3245136Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.3245622Z self.lower_block(block)
2021-07-06T06:32:25.3246284Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.3246936Z self.lower_inst(inst)
2021-07-06T06:32:25.3247695Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.3248141Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.3248522Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3248744Z
2021-07-06T06:32:25.3249648Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.3251277Z kwargs = {'inst': id=4[LoopNest(index_variable = parfor_index.212, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hos...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.3252584Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.3253545Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.3254798Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...r_index.212, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.3255507Z tb = None
2021-07-06T06:32:25.3255641Z
2021-07-06T06:32:25.3255888Z @contextlib.contextmanager
2021-07-06T06:32:25.3256238Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.3256578Z """
2021-07-06T06:32:25.3256917Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.3257388Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.3257993Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.3258467Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.3258821Z constructor.
2021-07-06T06:32:25.3259075Z
2021-07-06T06:32:25.3259409Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.3259876Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.3260324Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.3260680Z """
2021-07-06T06:32:25.3261192Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.3261494Z
2021-07-06T06:32:25.3261934Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.3262352Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.3262787Z loc_info.update(kwargs)
2021-07-06T06:32:25.3263046Z
2021-07-06T06:32:25.3263290Z try:
2021-07-06T06:32:25.3263543Z yield
2021-07-06T06:32:25.3263932Z except NumbaError as e:
2021-07-06T06:32:25.3264309Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.3264877Z raise
2021-07-06T06:32:25.3265189Z except Exception as e:
2021-07-06T06:32:25.3265571Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.3266039Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.3266438Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.3267262Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.3267989Z E No threading layer could be loaded.
2021-07-06T06:32:25.3268530Z E HINT:
2021-07-06T06:32:25.3269083Z E Intel TBB is required, try:
2021-07-06T06:32:25.3269658Z E $ conda/pip install tbb
2021-07-06T06:32:25.3270130Z E 
2021-07-06T06:32:25.3270864Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.3271593Z E def compute_membership_strengths(
2021-07-06T06:32:25.3272934Z E <source elided>
2021-07-06T06:32:25.3274726Z E 
2021-07-06T06:32:25.3276033Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.3276626Z E ^
2021-07-06T06:32:25.3277063Z E 
2021-07-06T06:32:25.3278463Z E During: lowering "id=4[LoopNest(index_variable = parfor_index.212, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.212, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.3279274Z
2021-07-06T06:32:25.3279949Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.3280686Z ---------------------------- Captured stderr setup -----------------------------
2021-07-06T06:32:25.3281072Z computing PCA
2021-07-06T06:32:25.3281323Z with n_comps=50
2021-07-06T06:32:25.3281617Z finished (0:00:00)
2021-07-06T06:32:25.3281892Z computing neighbors
2021-07-06T06:32:25.3282329Z using 'X_pca' with n_pcs = 50
2021-07-06T06:32:25.3282976Z _________________ ERROR at setup of test_neighbors_defaults[3] _________________
2021-07-06T06:32:25.3283234Z
2021-07-06T06:32:25.3283696Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.3284790Z kwargs = {'inst': id=8[LoopNest(index_variable = parfor_index.393, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hos...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.3286325Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.3287271Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.3288523Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...r_index.393, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.3289566Z tb = None
2021-07-06T06:32:25.3289701Z
2021-07-06T06:32:25.3289946Z @contextlib.contextmanager
2021-07-06T06:32:25.3290297Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.3290644Z """
2021-07-06T06:32:25.3290987Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.3291574Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.3292026Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.3292490Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.3292844Z constructor.
2021-07-06T06:32:25.3293102Z
2021-07-06T06:32:25.3293433Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.3293903Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.3294351Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.3294708Z """
2021-07-06T06:32:25.3295217Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.3295527Z
2021-07-06T06:32:25.3295970Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.3296390Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.3296827Z loc_info.update(kwargs)
2021-07-06T06:32:25.3297088Z
2021-07-06T06:32:25.3297335Z try:
2021-07-06T06:32:25.3297586Z > yield
2021-07-06T06:32:25.3297713Z
2021-07-06T06:32:25.3299976Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.3301694Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3301951Z
2021-07-06T06:32:25.3302485Z self = <numba.core.lowering.Lower object at 0x7f16ad3bf7d0>
2021-07-06T06:32:25.3303291Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.3303600Z
2021-07-06T06:32:25.3303875Z def lower_block(self, block):
2021-07-06T06:32:25.3304178Z """
2021-07-06T06:32:25.3304457Z Lower the given block.
2021-07-06T06:32:25.3304909Z """
2021-07-06T06:32:25.3305621Z self.pre_block(block)
2021-07-06T06:32:25.3305968Z for inst in block.body:
2021-07-06T06:32:25.3306303Z self.loc = inst.loc
2021-07-06T06:32:25.3306652Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.3307399Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.3307888Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.3308320Z > self.lower_inst(inst)
2021-07-06T06:32:25.3308482Z
2021-07-06T06:32:25.3309777Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.3310388Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3310620Z
2021-07-06T06:32:25.3311081Z self = <numba.core.lowering.Lower object at 0x7f16ad3bf7d0>
2021-07-06T06:32:25.3312278Z inst = id=8[LoopNest(index_variable = parfor_index.393, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.393, umap_.py:404)
2021-07-06T06:32:25.3312846Z
2021-07-06T06:32:25.3313138Z def lower_inst(self, inst):
2021-07-06T06:32:25.3313505Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.3313902Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.3314346Z self.debug_print(str(inst))
2021-07-06T06:32:25.3314683Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.3315058Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.3315404Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.3315771Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.3316052Z
2021-07-06T06:32:25.3317013Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.3317452Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.3317816Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.3318365Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.3318639Z
2021-07-06T06:32:25.3318938Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.3319341Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.3319846Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.3320278Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.3320576Z
2021-07-06T06:32:25.3321222Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.3321814Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.3322147Z self.builder.branch(target)
2021-07-06T06:32:25.3322430Z
2021-07-06T06:32:25.3322722Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.3323092Z if self.generator_info:
2021-07-06T06:32:25.3323432Z # StopIteration
2021-07-06T06:32:25.3323770Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.3324122Z return
2021-07-06T06:32:25.3324429Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.3324794Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.3325122Z ty = self.fndesc.restype
2021-07-06T06:32:25.3325647Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.3326006Z # If returning an optional type
2021-07-06T06:32:25.3326567Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.3327093Z return
2021-07-06T06:32:25.3327543Z assert ty == oty, (
2021-07-06T06:32:25.3328238Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.3328695Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.3329137Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.3329440Z
2021-07-06T06:32:25.3329768Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.3330150Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3330512Z assert signature is not None
2021-07-06T06:32:25.3330807Z try:
2021-07-06T06:32:25.3331411Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.3331852Z except NotImplementedError:
2021-07-06T06:32:25.3332245Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.3332678Z inst.value, signature)
2021-07-06T06:32:25.3333708Z else:
2021-07-06T06:32:25.3334088Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.3334782Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.3335409Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.3335807Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.3336245Z signature.args[2])
2021-07-06T06:32:25.3336648Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.3336983Z
2021-07-06T06:32:25.3337271Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.3337610Z self.lower_print(inst)
2021-07-06T06:32:25.3337886Z
2021-07-06T06:32:25.3338175Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.3338562Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3338903Z assert signature is not None
2021-07-06T06:32:25.3339300Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.3339695Z signature)
2021-07-06T06:32:25.3339998Z
2021-07-06T06:32:25.3340295Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.3340684Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3341116Z assert signature is not None
2021-07-06T06:32:25.3341507Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.3341863Z
2021-07-06T06:32:25.3342153Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.3342532Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.3342872Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.3343173Z
2021-07-06T06:32:25.3343457Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.3343836Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.3344119Z
2021-07-06T06:32:25.3344402Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3344905Z assert signature is not None
2021-07-06T06:32:25.3345175Z
2021-07-06T06:32:25.3345460Z op = operator.delitem
2021-07-06T06:32:25.3345822Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.3346220Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.3346586Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.3346927Z )
2021-07-06T06:32:25.3347240Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.3347559Z
2021-07-06T06:32:25.3347838Z assert targetty == signature.args[0]
2021-07-06T06:32:25.3348950Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.3349392Z signature.args[1])
2021-07-06T06:32:25.3349688Z
2021-07-06T06:32:25.3349995Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.3350438Z
2021-07-06T06:32:25.3350911Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.3351249Z self.delvar(inst.value)
2021-07-06T06:32:25.3351545Z
2021-07-06T06:32:25.3351834Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.3352201Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.3352592Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.3352949Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3353258Z
2021-07-06T06:32:25.3353543Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.3353928Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.3354269Z assert signature is not None
2021-07-06T06:32:25.3354633Z assert signature.args[0] == targetty
2021-07-06T06:32:25.3355161Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.3355482Z
2021-07-06T06:32:25.3355901Z # Convert argument to match
2021-07-06T06:32:25.3356266Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.3356846Z signature.args[1])
2021-07-06T06:32:25.3357292Z
2021-07-06T06:32:25.3357765Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.3358061Z
2021-07-06T06:32:25.3359156Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.3359581Z self.lower_static_raise(inst)
2021-07-06T06:32:25.3359883Z
2021-07-06T06:32:25.3360189Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.3360561Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.3360856Z
2021-07-06T06:32:25.3361083Z else:
2021-07-06T06:32:25.3361445Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.3361858Z if isinstance(inst, _class):
2021-07-06T06:32:25.3362225Z > func(self, inst)
2021-07-06T06:32:25.3362383Z
2021-07-06T06:32:25.3363138Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.3363712Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3363942Z
2021-07-06T06:32:25.3364237Z lowerer = <numba.core.lowering.Lower object at 0x7f16ad3bf7d0>
2021-07-06T06:32:25.3365547Z parfor = id=8[LoopNest(index_variable = parfor_index.393, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.393, umap_.py:404)
2021-07-06T06:32:25.3366114Z
2021-07-06T06:32:25.3366442Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.3366849Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.3367256Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.3376247Z The general approach is as follows:
2021-07-06T06:32:25.3377085Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.3377500Z in the context of the current function.
2021-07-06T06:32:25.3377916Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.3378376Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.3378813Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.3380199Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.3380822Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.3381223Z the final reduction values.
2021-07-06T06:32:25.3381500Z """
2021-07-06T06:32:25.3381831Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.3382136Z
2021-07-06T06:32:25.3382409Z ensure_parallel_support()
2021-07-06T06:32:25.3382740Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.3383093Z targetctx = lowerer.context
2021-07-06T06:32:25.3383786Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.3384262Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.3384852Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.3385266Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.3385706Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.3386071Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3386477Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.3386860Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.3387190Z varmap = lowerer.varmap
2021-07-06T06:32:25.3387641Z
2021-07-06T06:32:25.3387936Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3388277Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.3388586Z parfor.dump()
2021-07-06T06:32:25.3388851Z
2021-07-06T06:32:25.3389110Z loc = parfor.init_block.loc
2021-07-06T06:32:25.3389625Z scope = parfor.init_block.scope
2021-07-06T06:32:25.3390051Z
2021-07-06T06:32:25.3390495Z # produce instructions for init_block
2021-07-06T06:32:25.3390820Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3391212Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.3391610Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.3391976Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3392319Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.3392823Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.3393105Z
2021-07-06T06:32:25.3393382Z for racevar in parfor.races:
2021-07-06T06:32:25.3393751Z if racevar not in varmap:
2021-07-06T06:32:25.3394089Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.3394446Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.3394804Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.3395111Z
2021-07-06T06:32:25.3395348Z alias_map = {}
2021-07-06T06:32:25.3395618Z arg_aliases = {}
2021-07-06T06:32:25.3396111Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.3396592Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.3397014Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3397801Z print("alias_map", alias_map)
2021-07-06T06:32:25.3398181Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.3398455Z
2021-07-06T06:32:25.3398812Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.3399274Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.3399681Z assert parfor.params is not None
2021-07-06T06:32:25.3399950Z
2021-07-06T06:32:25.3400657Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.3401080Z parfor, parfor.params)
2021-07-06T06:32:25.3401467Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.3401944Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.3402336Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3402726Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.3403124Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.3403447Z
2021-07-06T06:32:25.3403731Z # init reduction array allocation here.
2021-07-06T06:32:25.3404082Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.3404372Z redarrs = {}
2021-07-06T06:32:25.3404652Z if nredvars > 0:
2021-07-06T06:32:25.3405028Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.3405408Z thread_count = get_thread_count()
2021-07-06T06:32:25.3406092Z scope = parfor.init_block.scope
2021-07-06T06:32:25.3406916Z loc = parfor.init_block.loc
2021-07-06T06:32:25.3407304Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.3409287Z
2021-07-06T06:32:25.3409613Z # For each reduction variable...
2021-07-06T06:32:25.3409960Z for i in range(nredvars):
2021-07-06T06:32:25.3410367Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.3410777Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.3411181Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.3411579Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.3411937Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3412400Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.3412764Z
2021-07-06T06:32:25.3413242Z # If this is reduction over an array,
2021-07-06T06:32:25.3413988Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.3414503Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3414920Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.3415265Z else:
2021-07-06T06:32:25.3415561Z redarrdim = 1
2021-07-06T06:32:25.3415836Z
2021-07-06T06:32:25.3416185Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.3417281Z
2021-07-06T06:32:25.3417630Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.3418024Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.3418391Z fobj=np.empty,
2021-07-06T06:32:25.3418727Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.3419085Z args=(
2021-07-06T06:32:25.3419424Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.3419967Z types.DType(reddtype),
2021-07-06T06:32:25.3420763Z ),
2021-07-06T06:32:25.3421595Z )
2021-07-06T06:32:25.3422083Z
2021-07-06T06:32:25.3422434Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.3422898Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3423542Z cval=thread_count,
2021-07-06T06:32:25.3424208Z typ=types.intp,
2021-07-06T06:32:25.3425176Z name='num_threads',
2021-07-06T06:32:25.3425520Z )
2021-07-06T06:32:25.3425931Z
2021-07-06T06:32:25.3426230Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.3426515Z
2021-07-06T06:32:25.3426808Z # If this is a reduction over an array...
2021-07-06T06:32:25.3427267Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3427733Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.3428164Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.3428546Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.3428984Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.3429900Z name="redarr_shape",
2021-07-06T06:32:25.3430212Z )
2021-07-06T06:32:25.3430625Z
2021-07-06T06:32:25.3431029Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.3431523Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.3431929Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.3432339Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.3432747Z typ=types.intp,
2021-07-06T06:32:25.3433112Z name="redshapeonedim",
2021-07-06T06:32:25.3433583Z )
2021-07-06T06:32:25.3434505Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.3434777Z
2021-07-06T06:32:25.3435140Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.3435564Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.3436130Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.3436439Z )
2021-07-06T06:32:25.3436671Z
2021-07-06T06:32:25.3436953Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.3437336Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.3437650Z
2021-07-06T06:32:25.3437900Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.3438421Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.3438733Z )
2021-07-06T06:32:25.3438970Z
2021-07-06T06:32:25.3439566Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.3440021Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.3440284Z
2021-07-06T06:32:25.3440583Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.3440938Z if init_val is not None:
2021-07-06T06:32:25.3441695Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3442182Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.3442609Z # First, create a variable for np.full.
2021-07-06T06:32:25.3443034Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.3443411Z fobj=np.full,
2021-07-06T06:32:25.3443789Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.3444238Z args=(
2021-07-06T06:32:25.3444632Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.3445018Z reddtype,
2021-07-06T06:32:25.3445388Z types.DType(reddtype),
2021-07-06T06:32:25.3445723Z ),
2021-07-06T06:32:25.3446033Z )
2021-07-06T06:32:25.3446276Z
2021-07-06T06:32:25.3446587Z # Then create a var with the identify value.
2021-07-06T06:32:25.3447017Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3447387Z cval=init_val,
2021-07-06T06:32:25.3447734Z typ=reddtype,
2021-07-06T06:32:25.3448066Z name="init_val",
2021-07-06T06:32:25.3448396Z )
2021-07-06T06:32:25.3448639Z
2021-07-06T06:32:25.3449031Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.3449486Z full_call = pfbdr.call(
2021-07-06T06:32:25.3449900Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.3450269Z )
2021-07-06T06:32:25.3450510Z
2021-07-06T06:32:25.3450806Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.3451147Z rhs=full_call,
2021-07-06T06:32:25.3451496Z typ=redvar_typ,
2021-07-06T06:32:25.3451832Z name="redtoset",
2021-07-06T06:32:25.3452321Z )
2021-07-06T06:32:25.3452779Z else:
2021-07-06T06:32:25.3453147Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.3453518Z cval=init_val,
2021-07-06T06:32:25.3453847Z typ=reddtype,
2021-07-06T06:32:25.3454198Z name="redtoset",
2021-07-06T06:32:25.3454511Z )
2021-07-06T06:32:25.3454811Z else:
2021-07-06T06:32:25.3455112Z redtoset = redvar
2021-07-06T06:32:25.3455395Z
2021-07-06T06:32:25.3455710Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.3456217Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.3456709Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.3457047Z
2021-07-06T06:32:25.3457337Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.3457700Z cval=res_print_str,
2021-07-06T06:32:25.3458215Z typ=strconsttyp,
2021-07-06T06:32:25.3458723Z name="str_const",
2021-07-06T06:32:25.3459138Z )
2021-07-06T06:32:25.3459380Z
2021-07-06T06:32:25.3459702Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.3460114Z vararg=None, loc=loc)
2021-07-06T06:32:25.3460571Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.3461036Z typemap[lhs.name],
2021-07-06T06:32:25.3461523Z typemap[redvar.name])
2021-07-06T06:32:25.3461956Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.3462359Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.3462649Z
2021-07-06T06:32:25.3463011Z
2021-07-06T06:32:25.3463676Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.3464780Z for j in range(thread_count):
2021-07-06T06:32:25.3465192Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3465702Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.3466065Z )
2021-07-06T06:32:25.3466425Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.3466778Z
2021-07-06T06:32:25.3467110Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.3467521Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.3468060Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.3468666Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.3469156Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.3469592Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.3470386Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.3470929Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.3471710Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.3472023Z try:
2021-07-06T06:32:25.3472469Z (func,
2021-07-06T06:32:25.3473068Z func_args,
2021-07-06T06:32:25.3473355Z func_sig,
2021-07-06T06:32:25.3473632Z redargstartdim,
2021-07-06T06:32:25.3473920Z func_arg_types,
2021-07-06T06:32:25.3474294Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.3475780Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.3476307Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.3476640Z finally:
2021-07-06T06:32:25.3476999Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.3477324Z
2021-07-06T06:32:25.3477598Z # get the shape signature
2021-07-06T06:32:25.3478204Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.3478587Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.3479188Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.3479764Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3480094Z print("func_args = ", func_args)
2021-07-06T06:32:25.3480424Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.3480991Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.3481549Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.3482108Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.3482471Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.3482827Z parfor.get_shape_classes,
2021-07-06T06:32:25.3483121Z num_inputs,
2021-07-06T06:32:25.3483611Z num_reductions,
2021-07-06T06:32:25.3483890Z func_args,
2021-07-06T06:32:25.3484164Z redargstartdim,
2021-07-06T06:32:25.3484631Z func_sig,
2021-07-06T06:32:25.3485075Z parfor.races,
2021-07-06T06:32:25.3485369Z typemap)
2021-07-06T06:32:25.3485844Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3486385Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.3486816Z
2021-07-06T06:32:25.3487158Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.3488369Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.3488996Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3489355Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.3489715Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.3490220Z call_parallel_gufunc(
2021-07-06T06:32:25.3490676Z lowerer,
2021-07-06T06:32:25.3491702Z func,
2021-07-06T06:32:25.3491988Z gu_signature,
2021-07-06T06:32:25.3492290Z func_sig,
2021-07-06T06:32:25.3492712Z func_args,
2021-07-06T06:32:25.3493014Z func_arg_types,
2021-07-06T06:32:25.3493296Z loop_ranges,
2021-07-06T06:32:25.3493573Z parfor_redvars,
2021-07-06T06:32:25.3493878Z parfor_reddict,
2021-07-06T06:32:25.3494151Z redarrs,
2021-07-06T06:32:25.3494446Z parfor.init_block,
2021-07-06T06:32:25.3494732Z index_var_typ,
2021-07-06T06:32:25.3495027Z parfor.races,
2021-07-06T06:32:25.3495318Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.3495473Z
2021-07-06T06:32:25.3496261Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.3496816Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3497054Z
2021-07-06T06:32:25.3497370Z lowerer = <numba.core.lowering.Lower object at 0x7f16ad3bf7d0>
2021-07-06T06:32:25.3498202Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16abaacb50>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.3499031Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.3499560Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.3500166Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.3500612Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.3501005Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.3501641Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.3502139Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.3502341Z
2021-07-06T06:32:25.3502675Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.3503199Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.3503658Z exp_name_to_tuple_var):
2021-07-06T06:32:25.3504132Z '''
2021-07-06T06:32:25.3504458Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.3505240Z '''
2021-07-06T06:32:25.3505514Z context = lowerer.context
2021-07-06T06:32:25.3505829Z builder = lowerer.builder
2021-07-06T06:32:25.3506078Z
2021-07-06T06:32:25.3506376Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.3506770Z get_thread_count,
2021-07-06T06:32:25.3507108Z _launch_threads)
2021-07-06T06:32:25.3507523Z
2021-07-06T06:32:25.3507789Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3508129Z print("make_parallel_loop")
2021-07-06T06:32:25.3508491Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.3508898Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.3509242Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.3509587Z print("expr_args", expr_args)
2021-07-06T06:32:25.3509921Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.3510261Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.3510548Z
2021-07-06T06:32:25.3510803Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.3511174Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.3511582Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.3512856Z sin, sout = gu_signature
2021-07-06T06:32:25.3513135Z
2021-07-06T06:32:25.3513483Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.3513849Z > _launch_threads()
2021-07-06T06:32:25.3514768Z
2021-07-06T06:32:25.3515632Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.3516344Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3516565Z
2021-07-06T06:32:25.3516831Z def _launch_threads():
2021-07-06T06:32:25.3517161Z if not _backend_init_process_lock:
2021-07-06T06:32:25.3517552Z _set_init_process_lock()
2021-07-06T06:32:25.3517809Z
2021-07-06T06:32:25.3518103Z with _backend_init_process_lock:
2021-07-06T06:32:25.3518460Z with _backend_init_thread_lock:
2021-07-06T06:32:25.3518813Z global _is_initialized
2021-07-06T06:32:25.3519309Z if _is_initialized:
2021-07-06T06:32:25.3519637Z return
2021-07-06T06:32:25.3519901Z
2021-07-06T06:32:25.3520208Z def select_known_backend(backend):
2021-07-06T06:32:25.3520565Z """
2021-07-06T06:32:25.3520926Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.3521304Z """
2021-07-06T06:32:25.3522607Z lib = None
2021-07-06T06:32:25.3523041Z if backend.startswith("tbb"):
2021-07-06T06:32:25.3523406Z try:
2021-07-06T06:32:25.3523777Z # check if TBB is present and compatible
2021-07-06T06:32:25.3524201Z _check_tbb_version_compatible()
2021-07-06T06:32:25.3524587Z # now try and load the backend
2021-07-06T06:32:25.3525336Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.3525734Z except ImportError:
2021-07-06T06:32:25.3526105Z pass
2021-07-06T06:32:25.3526462Z elif backend.startswith("omp"):
2021-07-06T06:32:25.3526927Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.3527379Z # that understands GNU OMP might be present
2021-07-06T06:32:25.3527769Z try:
2021-07-06T06:32:25.3528326Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.3528735Z except ImportError:
2021-07-06T06:32:25.3529063Z pass
2021-07-06T06:32:25.3529589Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.3530039Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.3530576Z else:
2021-07-06T06:32:25.3531002Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.3531436Z raise ValueError(msg % backend)
2021-07-06T06:32:25.3531939Z return lib
2021-07-06T06:32:25.3532182Z
2021-07-06T06:32:25.3532505Z def select_from_backends(backends):
2021-07-06T06:32:25.3533009Z """
2021-07-06T06:32:25.3533399Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.3533767Z """
2021-07-06T06:32:25.3534048Z lib = None
2021-07-06T06:32:25.3534411Z for backend in backends:
2021-07-06T06:32:25.3534796Z lib = select_known_backend(backend)
2021-07-06T06:32:25.3535201Z if lib is not None:
2021-07-06T06:32:25.3535542Z break
2021-07-06T06:32:25.3535868Z else:
2021-07-06T06:32:25.3536460Z backend = ''
2021-07-06T06:32:25.3536825Z return lib, backend
2021-07-06T06:32:25.3537092Z
2021-07-06T06:32:25.3537409Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.3537983Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.3538293Z
2021-07-06T06:32:25.3538820Z lib = None
2021-07-06T06:32:25.3539106Z err_helpers = dict()
2021-07-06T06:32:25.3539719Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.3540161Z "$ conda/pip install tbb")
2021-07-06T06:32:25.3540818Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.3541479Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.3541872Z requirements = []
2021-07-06T06:32:25.3542120Z
2021-07-06T06:32:25.3542425Z def raise_with_hint(required):
2021-07-06T06:32:25.3542818Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.3543196Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.3543582Z if len(required) == 0:
2021-07-06T06:32:25.3544064Z hint = ''
2021-07-06T06:32:25.3544431Z if len(required) == 1:
2021-07-06T06:32:25.3544956Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.3545358Z if len(required) > 1:
2021-07-06T06:32:25.3546619Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.3547177Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.3547580Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.3547876Z
2021-07-06T06:32:25.3548149Z if t in namedbackends:
2021-07-06T06:32:25.3548688Z # Try and load the specific named backend
2021-07-06T06:32:25.3549085Z lib = select_known_backend(t)
2021-07-06T06:32:25.3549427Z if not lib:
2021-07-06T06:32:25.3549850Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.3550275Z # loading, set requirements for hinting
2021-07-06T06:32:25.3550950Z if t == 'tbb':
2021-07-06T06:32:25.3551506Z requirements.append('TBB')
2021-07-06T06:32:25.3552105Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.3552853Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3553401Z libname = t
2021-07-06T06:32:25.3553965Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.3554737Z # User wants a specific behaviour...
2021-07-06T06:32:25.3555252Z available = ['tbb']
2021-07-06T06:32:25.3555758Z requirements.append('TBB')
2021-07-06T06:32:25.3556137Z if t == "safe":
2021-07-06T06:32:25.3556540Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.3557101Z pass
2021-07-06T06:32:25.3557436Z elif t == "threadsafe":
2021-07-06T06:32:25.3557823Z if _IS_OSX:
2021-07-06T06:32:25.3558737Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3559860Z # omp is threadsafe everywhere
2021-07-06T06:32:25.3560503Z available.append('omp')
2021-07-06T06:32:25.3561551Z elif t == "forksafe":
2021-07-06T06:32:25.3561981Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.3562439Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.3562848Z # this to workqueue
2021-07-06T06:32:25.3563188Z if not _IS_LINUX:
2021-07-06T06:32:25.3575463Z available.append('omp')
2021-07-06T06:32:25.3576425Z if _IS_OSX:
2021-07-06T06:32:25.3577523Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3578120Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.3578711Z available.append('workqueue')
2021-07-06T06:32:25.3579103Z else: # unreachable
2021-07-06T06:32:25.3579504Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.3579903Z raise ValueError(msg % t)
2021-07-06T06:32:25.3580275Z # select amongst available
2021-07-06T06:32:25.3580651Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.3581214Z elif t == 'default':
2021-07-06T06:32:25.3581617Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.3582006Z # workqueue
2021-07-06T06:32:25.3582365Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.3582766Z if not lib:
2021-07-06T06:32:25.3583119Z # set requirements for hinting
2021-07-06T06:32:25.3583686Z requirements.append('TBB')
2021-07-06T06:32:25.3584049Z if _IS_OSX:
2021-07-06T06:32:25.3584758Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3585859Z else:
2021-07-06T06:32:25.3586581Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.3587030Z raise ValueError(msg % t)
2021-07-06T06:32:25.3587308Z
2021-07-06T06:32:25.3587604Z # No lib found, raise and hint
2021-07-06T06:32:25.3587931Z if not lib:
2021-07-06T06:32:25.3588725Z > raise_with_hint(requirements)
2021-07-06T06:32:25.3588924Z
2021-07-06T06:32:25.3589661Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.3590239Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3590476Z
2021-07-06T06:32:25.3590847Z required = ['TBB']
2021-07-06T06:32:25.3591003Z
2021-07-06T06:32:25.3591274Z def raise_with_hint(required):
2021-07-06T06:32:25.3591660Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.3592011Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.3592330Z if len(required) == 0:
2021-07-06T06:32:25.3592788Z hint = ''
2021-07-06T06:32:25.3593090Z if len(required) == 1:
2021-07-06T06:32:25.3593456Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.3593799Z if len(required) > 1:
2021-07-06T06:32:25.3594371Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.3594919Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.3595463Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.3596143Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.3597697Z E HINT:
2021-07-06T06:32:25.3598485Z E Intel TBB is required, try:
2021-07-06T06:32:25.3599039Z E $ conda/pip install tbb
2021-07-06T06:32:25.3599217Z
2021-07-06T06:32:25.3599952Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.3600271Z
2021-07-06T06:32:25.3600819Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.3601153Z
2021-07-06T06:32:25.3601584Z @pytest.fixture
2021-07-06T06:32:25.3601895Z def adatas():
2021-07-06T06:32:25.3602190Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.3602874Z n_split = 500
2021-07-06T06:32:25.3603313Z adata_ref = sc.AnnData(pbmc.X[:n_split, :], obs=pbmc.obs.iloc[:n_split])
2021-07-06T06:32:25.3603772Z adata_new = sc.AnnData(pbmc.X[n_split:, :])
2021-07-06T06:32:25.3604105Z
2021-07-06T06:32:25.3604516Z sc.pp.pca(adata_ref)
2021-07-06T06:32:25.3604953Z > sc.pp.neighbors(adata_ref)
2021-07-06T06:32:25.3605104Z
2021-07-06T06:32:25.3605649Z scanpy/tests/test_ingest.py:34:
2021-07-06T06:32:25.3606251Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3606942Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.3607308Z random_state=random_state,
2021-07-06T06:32:25.3608062Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.3608414Z self.n_neighbors,
2021-07-06T06:32:25.3610028Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.3610500Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.3611240Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.3611882Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.3612664Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.3613202Z raise e
2021-07-06T06:32:25.3613893Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.3614485Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.3615208Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.3615831Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.3616574Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.3617153Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.3617925Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.3618504Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.3619247Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.3619802Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.3620520Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.3621118Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.3622284Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.3622911Z return self._compile_bytecode()
2021-07-06T06:32:25.3623696Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.3624421Z return self._compile_core()
2021-07-06T06:32:25.3626008Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.3626611Z raise e
2021-07-06T06:32:25.3627378Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.3627955Z pm.run(self.state)
2021-07-06T06:32:25.3628673Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.3629205Z raise patched_exception
2021-07-06T06:32:25.3629912Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.3630399Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.3631214Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.3631719Z return func(*args, **kwargs)
2021-07-06T06:32:25.3632681Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.3633893Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.3634845Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.3635339Z mangled = func(compiler_state)
2021-07-06T06:32:25.3636151Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.3636635Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.3637412Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.3637876Z lower.lower()
2021-07-06T06:32:25.3638778Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.3639250Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.3640098Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.3640597Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.3641382Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.3641842Z self.lower_block(block)
2021-07-06T06:32:25.3643731Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.3644207Z self.lower_inst(inst)
2021-07-06T06:32:25.3644887Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.3645338Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.3645771Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3646001Z
2021-07-06T06:32:25.3646437Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.3647590Z kwargs = {'inst': id=8[LoopNest(index_variable = parfor_index.393, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hos...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.3648821Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.3649797Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.3650987Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...r_index.393, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.3652079Z tb = None
2021-07-06T06:32:25.3652196Z
2021-07-06T06:32:25.3652543Z @contextlib.contextmanager
2021-07-06T06:32:25.3652901Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.3653905Z """
2021-07-06T06:32:25.3654435Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.3654892Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.3655402Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.3656025Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.3656799Z constructor.
2021-07-06T06:32:25.3657016Z
2021-07-06T06:32:25.3657413Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.3657865Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.3658484Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.3658814Z """
2021-07-06T06:32:25.3659447Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.3659751Z
2021-07-06T06:32:25.3660164Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.3660633Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.3661027Z loc_info.update(kwargs)
2021-07-06T06:32:25.3661627Z
2021-07-06T06:32:25.3662257Z try:
2021-07-06T06:32:25.3662751Z yield
2021-07-06T06:32:25.3663261Z except NumbaError as e:
2021-07-06T06:32:25.3663741Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.3664067Z raise
2021-07-06T06:32:25.3664354Z except Exception as e:
2021-07-06T06:32:25.3664977Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.3665432Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.3665893Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.3666686Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.3667487Z E No threading layer could be loaded.
2021-07-06T06:32:25.3668005Z E HINT:
2021-07-06T06:32:25.3669148Z E Intel TBB is required, try:
2021-07-06T06:32:25.3669687Z E $ conda/pip install tbb
2021-07-06T06:32:25.3670195Z E 
2021-07-06T06:32:25.3670911Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.3671890Z E def compute_membership_strengths(
2021-07-06T06:32:25.3672456Z E <source elided>
2021-07-06T06:32:25.3672920Z E 
2021-07-06T06:32:25.3673765Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.3674276Z E ^
2021-07-06T06:32:25.3674985Z E 
2021-07-06T06:32:25.3677065Z E During: lowering "id=8[LoopNest(index_variable = parfor_index.393, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.393, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.3677967Z
2021-07-06T06:32:25.3679148Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.3680517Z ---------------------------- Captured stderr setup -----------------------------
2021-07-06T06:32:25.3681795Z computing PCA
2021-07-06T06:32:25.3682132Z with n_comps=50
2021-07-06T06:32:25.3682411Z finished (0:00:00)
2021-07-06T06:32:25.3682757Z computing neighbors
2021-07-06T06:32:25.3683308Z using 'X_pca' with n_pcs = 50
2021-07-06T06:32:25.3684004Z _________________ ERROR at setup of test_neighbors_defaults[4] _________________
2021-07-06T06:32:25.3684267Z
2021-07-06T06:32:25.3684715Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.3685953Z kwargs = {'inst': id=12[LoopNest(index_variable = parfor_index.574, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/ho...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.3687236Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.3688299Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.3689681Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...r_index.574, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.3690464Z tb = None
2021-07-06T06:32:25.3690578Z
2021-07-06T06:32:25.3690876Z @contextlib.contextmanager
2021-07-06T06:32:25.3691227Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.3691602Z """
2021-07-06T06:32:25.3691942Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.3692392Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.3692899Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.3693353Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.3693766Z constructor.
2021-07-06T06:32:25.3694002Z
2021-07-06T06:32:25.3694393Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.3694845Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.3695398Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.3695740Z """
2021-07-06T06:32:25.3696290Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.3696595Z
2021-07-06T06:32:25.3697072Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.3697495Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.3697905Z loc_info.update(kwargs)
2021-07-06T06:32:25.3698221Z
2021-07-06T06:32:25.3698449Z try:
2021-07-06T06:32:25.3698756Z > yield
2021-07-06T06:32:25.3698889Z
2021-07-06T06:32:25.3699652Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.3701322Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3701563Z
2021-07-06T06:32:25.3701844Z self = <numba.core.lowering.Lower object at 0x7f16ad968290>
2021-07-06T06:32:25.3702682Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.3702960Z
2021-07-06T06:32:25.3703295Z def lower_block(self, block):
2021-07-06T06:32:25.3703574Z """
2021-07-06T06:32:25.3704007Z Lower the given block.
2021-07-06T06:32:25.3704273Z """
2021-07-06T06:32:25.3704861Z self.pre_block(block)
2021-07-06T06:32:25.3705237Z for inst in block.body:
2021-07-06T06:32:25.3706009Z self.loc = inst.loc
2021-07-06T06:32:25.3706472Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.3707359Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.3707920Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.3708343Z > self.lower_inst(inst)
2021-07-06T06:32:25.3708505Z
2021-07-06T06:32:25.3709184Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.3709711Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3710000Z
2021-07-06T06:32:25.3710657Z self = <numba.core.lowering.Lower object at 0x7f16ad968290>
2021-07-06T06:32:25.3712920Z inst = id=12[LoopNest(index_variable = parfor_index.574, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.574, umap_.py:404)
2021-07-06T06:32:25.3713845Z
2021-07-06T06:32:25.3714148Z def lower_inst(self, inst):
2021-07-06T06:32:25.3714611Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.3715015Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.3715615Z self.debug_print(str(inst))
2021-07-06T06:32:25.3715959Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.3716314Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.3716714Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.3717062Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.3717397Z
2021-07-06T06:32:25.3717686Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.3718317Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.3718644Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.3719010Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.3719272Z
2021-07-06T06:32:25.3719541Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.3720322Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.3720795Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.3721289Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.3721557Z
2021-07-06T06:32:25.3721888Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.3722228Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.3722623Z self.builder.branch(target)
2021-07-06T06:32:25.3722879Z
2021-07-06T06:32:25.3723207Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.3723553Z if self.generator_info:
2021-07-06T06:32:25.3725129Z # StopIteration
2021-07-06T06:32:25.3725573Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.3725901Z return
2021-07-06T06:32:25.3726266Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.3726613Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.3727012Z ty = self.fndesc.restype
2021-07-06T06:32:25.3775324Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.3775830Z # If returning an optional type
2021-07-06T06:32:25.3777497Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.3777945Z return
2021-07-06T06:32:25.3778230Z assert ty == oty, (
2021-07-06T06:32:25.3778977Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.3779437Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.3779872Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.3780179Z
2021-07-06T06:32:25.3780503Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.3780887Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3781251Z assert signature is not None
2021-07-06T06:32:25.3781736Z try:
2021-07-06T06:32:25.3782353Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.3783511Z except NotImplementedError:
2021-07-06T06:32:25.3783937Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.3784376Z inst.value, signature)
2021-07-06T06:32:25.3784877Z else:
2021-07-06T06:32:25.3785224Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.3785597Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.3785983Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.3786380Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.3786808Z signature.args[2])
2021-07-06T06:32:25.3787215Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.3787556Z
2021-07-06T06:32:25.3787846Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.3788201Z self.lower_print(inst)
2021-07-06T06:32:25.3788460Z
2021-07-06T06:32:25.3788935Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.3789325Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3789672Z assert signature is not None
2021-07-06T06:32:25.3790068Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.3790465Z signature)
2021-07-06T06:32:25.3790764Z
2021-07-06T06:32:25.3791058Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.3791444Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3791789Z assert signature is not None
2021-07-06T06:32:25.3792179Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.3792530Z
2021-07-06T06:32:25.3792821Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.3793212Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.3793571Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.3793875Z
2021-07-06T06:32:25.3794161Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.3794542Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.3794826Z
2021-07-06T06:32:25.3795110Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3795473Z assert signature is not None
2021-07-06T06:32:25.3795740Z
2021-07-06T06:32:25.3796011Z op = operator.delitem
2021-07-06T06:32:25.3796371Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.3796761Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.3797128Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.3798187Z )
2021-07-06T06:32:25.3798536Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.3798868Z
2021-07-06T06:32:25.3799326Z assert targetty == signature.args[0]
2021-07-06T06:32:25.3799669Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.3800066Z signature.args[1])
2021-07-06T06:32:25.3800350Z
2021-07-06T06:32:25.3800644Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.3800923Z
2021-07-06T06:32:25.3801211Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.3801535Z self.delvar(inst.value)
2021-07-06T06:32:25.3801800Z
2021-07-06T06:32:25.3802079Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.3802435Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.3804073Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.3804471Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.3804780Z
2021-07-06T06:32:25.3805282Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.3805667Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.3806010Z assert signature is not None
2021-07-06T06:32:25.3806374Z assert signature.args[0] == targetty
2021-07-06T06:32:25.3806756Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.3807081Z
2021-07-06T06:32:25.3807348Z # Convert argument to match
2021-07-06T06:32:25.3807717Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.3808293Z signature.args[1])
2021-07-06T06:32:25.3808756Z
2021-07-06T06:32:25.3809227Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.3809507Z
2021-07-06T06:32:25.3809812Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.3810342Z self.lower_static_raise(inst)
2021-07-06T06:32:25.3810629Z
2021-07-06T06:32:25.3810939Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.3811314Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.3811607Z
2021-07-06T06:32:25.3811932Z else:
2021-07-06T06:32:25.3812297Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.3812712Z if isinstance(inst, _class):
2021-07-06T06:32:25.3813079Z > func(self, inst)
2021-07-06T06:32:25.3813240Z
2021-07-06T06:32:25.3814000Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.3814558Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3814789Z
2021-07-06T06:32:25.3815084Z lowerer = <numba.core.lowering.Lower object at 0x7f16ad968290>
2021-07-06T06:32:25.3816213Z parfor = id=12[LoopNest(index_variable = parfor_index.574, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.574, umap_.py:404)
2021-07-06T06:32:25.3816787Z
2021-07-06T06:32:25.3817113Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.3817526Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.3817934Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.3819035Z The general approach is as follows:
2021-07-06T06:32:25.3820103Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.3820517Z in the context of the current function.
2021-07-06T06:32:25.3820916Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.3821372Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.3821801Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.3822242Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.3822686Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.3823080Z the final reduction values.
2021-07-06T06:32:25.3823364Z """
2021-07-06T06:32:25.3823693Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.3823996Z
2021-07-06T06:32:25.3824271Z ensure_parallel_support()
2021-07-06T06:32:25.3824755Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.3825534Z targetctx = lowerer.context
2021-07-06T06:32:25.3826874Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.3827347Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.3827765Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.3828635Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.3829065Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.3829598Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3830007Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.3830843Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.3831197Z varmap = lowerer.varmap
2021-07-06T06:32:25.3831450Z
2021-07-06T06:32:25.3831742Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3832080Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.3832402Z parfor.dump()
2021-07-06T06:32:25.3832647Z
2021-07-06T06:32:25.3833060Z loc = parfor.init_block.loc
2021-07-06T06:32:25.3833382Z scope = parfor.init_block.scope
2021-07-06T06:32:25.3833636Z
2021-07-06T06:32:25.3833918Z # produce instructions for init_block
2021-07-06T06:32:25.3834432Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3834852Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.3835436Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.3835822Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3836177Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.3836667Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.3836939Z
2021-07-06T06:32:25.3837206Z for racevar in parfor.races:
2021-07-06T06:32:25.3837560Z if racevar not in varmap:
2021-07-06T06:32:25.3837887Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.3838229Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.3838572Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.3838863Z
2021-07-06T06:32:25.3839092Z alias_map = {}
2021-07-06T06:32:25.3839351Z arg_aliases = {}
2021-07-06T06:32:25.3839906Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.3840352Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.3840932Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3841430Z print("alias_map", alias_map)
2021-07-06T06:32:25.3841782Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.3842063Z
2021-07-06T06:32:25.3842815Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.3843279Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.3843684Z assert parfor.params is not None
2021-07-06T06:32:25.3843954Z
2021-07-06T06:32:25.3844268Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.3844654Z parfor, parfor.params)
2021-07-06T06:32:25.3845041Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.3845671Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.3846417Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3846811Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.3847369Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.3847883Z
2021-07-06T06:32:25.3848162Z # init reduction array allocation here.
2021-07-06T06:32:25.3848512Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.3848803Z redarrs = {}
2021-07-06T06:32:25.3849084Z if nredvars > 0:
2021-07-06T06:32:25.3849459Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.3849839Z thread_count = get_thread_count()
2021-07-06T06:32:25.3850193Z scope = parfor.init_block.scope
2021-07-06T06:32:25.3850522Z loc = parfor.init_block.loc
2021-07-06T06:32:25.3850926Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.3851258Z
2021-07-06T06:32:25.3851546Z # For each reduction variable...
2021-07-06T06:32:25.3851892Z for i in range(nredvars):
2021-07-06T06:32:25.3852384Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.3852795Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.3853218Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.3853598Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.3853954Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3854415Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.3854780Z
2021-07-06T06:32:25.3855086Z # If this is reduction over an array,
2021-07-06T06:32:25.3855814Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.3856310Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3856728Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.3857069Z else:
2021-07-06T06:32:25.3857370Z redarrdim = 1
2021-07-06T06:32:25.3857647Z
2021-07-06T06:32:25.3857997Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.3858448Z
2021-07-06T06:32:25.3858772Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.3859166Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.3859531Z fobj=np.empty,
2021-07-06T06:32:25.3859866Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.3860208Z args=(
2021-07-06T06:32:25.3860545Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.3860932Z types.DType(reddtype),
2021-07-06T06:32:25.3861448Z ),
2021-07-06T06:32:25.3861896Z )
2021-07-06T06:32:25.3862127Z
2021-07-06T06:32:25.3862489Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.3862969Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3863325Z cval=thread_count,
2021-07-06T06:32:25.3863816Z typ=types.intp,
2021-07-06T06:32:25.3864750Z name='num_threads',
2021-07-06T06:32:25.3865092Z )
2021-07-06T06:32:25.3865322Z
2021-07-06T06:32:25.3865617Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.3865901Z
2021-07-06T06:32:25.3866196Z # If this is a reduction over an array...
2021-07-06T06:32:25.3866640Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3867101Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.3867522Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.3867902Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.3868345Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.3868730Z name="redarr_shape",
2021-07-06T06:32:25.3869048Z )
2021-07-06T06:32:25.3869291Z
2021-07-06T06:32:25.3869693Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.3870187Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.3870591Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.3871002Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.3871596Z typ=types.intp,
2021-07-06T06:32:25.3871948Z name="redshapeonedim",
2021-07-06T06:32:25.3872256Z )
2021-07-06T06:32:25.3872585Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.3872868Z
2021-07-06T06:32:25.3873244Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.3874001Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.3874635Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.3874966Z )
2021-07-06T06:32:25.3875214Z
2021-07-06T06:32:25.3875519Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.3875929Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.3876266Z
2021-07-06T06:32:25.3876535Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.3876929Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.3877264Z )
2021-07-06T06:32:25.3877509Z
2021-07-06T06:32:25.3879225Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.3879779Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.3880081Z
2021-07-06T06:32:25.3880403Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.3880787Z if init_val is not None:
2021-07-06T06:32:25.3881382Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.3881877Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.3882306Z # First, create a variable for np.full.
2021-07-06T06:32:25.3882731Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.3883104Z fobj=np.full,
2021-07-06T06:32:25.3883482Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.3883833Z args=(
2021-07-06T06:32:25.3884222Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.3884611Z reddtype,
2021-07-06T06:32:25.3884986Z types.DType(reddtype),
2021-07-06T06:32:25.3885319Z ),
2021-07-06T06:32:25.3885623Z )
2021-07-06T06:32:25.3885874Z
2021-07-06T06:32:25.3886186Z # Then create a var with the identify value.
2021-07-06T06:32:25.3886615Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3886987Z cval=init_val,
2021-07-06T06:32:25.3887335Z typ=reddtype,
2021-07-06T06:32:25.3887669Z name="init_val",
2021-07-06T06:32:25.3887993Z )
2021-07-06T06:32:25.3888236Z
2021-07-06T06:32:25.3888627Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.3889077Z full_call = pfbdr.call(
2021-07-06T06:32:25.3889491Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.3889861Z )
2021-07-06T06:32:25.3890103Z
2021-07-06T06:32:25.3890399Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.3890745Z rhs=full_call,
2021-07-06T06:32:25.3891096Z typ=redvar_typ,
2021-07-06T06:32:25.3891433Z name="redtoset",
2021-07-06T06:32:25.3891758Z )
2021-07-06T06:32:25.3892046Z else:
2021-07-06T06:32:25.3892410Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.3892775Z cval=init_val,
2021-07-06T06:32:25.3893123Z typ=reddtype,
2021-07-06T06:32:25.3893457Z name="redtoset",
2021-07-06T06:32:25.3893765Z )
2021-07-06T06:32:25.3894061Z else:
2021-07-06T06:32:25.3894360Z redtoset = redvar
2021-07-06T06:32:25.3894725Z
2021-07-06T06:32:25.3895041Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.3895549Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.3896046Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.3896382Z
2021-07-06T06:32:25.3896673Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.3897039Z cval=res_print_str,
2021-07-06T06:32:25.3897399Z typ=strconsttyp,
2021-07-06T06:32:25.3897739Z name="str_const",
2021-07-06T06:32:25.3898119Z )
2021-07-06T06:32:25.3898366Z
2021-07-06T06:32:25.3898688Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.3899095Z vararg=None, loc=loc)
2021-07-06T06:32:25.3900470Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.3900985Z typemap[lhs.name],
2021-07-06T06:32:25.3901474Z typemap[redvar.name])
2021-07-06T06:32:25.3902063Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.3902618Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.3902900Z
2021-07-06T06:32:25.3903099Z
2021-07-06T06:32:25.3903829Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.3904311Z for j in range(thread_count):
2021-07-06T06:32:25.3904855Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.3905240Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.3905581Z )
2021-07-06T06:32:25.3905927Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.3906271Z
2021-07-06T06:32:25.3906592Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.3906992Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.3907996Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.3908629Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.3909076Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.3909496Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.3909903Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.3910277Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.3910683Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.3911404Z try:
2021-07-06T06:32:25.3911665Z (func,
2021-07-06T06:32:25.3911919Z func_args,
2021-07-06T06:32:25.3912591Z func_sig,
2021-07-06T06:32:25.3912859Z redargstartdim,
2021-07-06T06:32:25.3913151Z func_arg_types,
2021-07-06T06:32:25.3913496Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.3913907Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.3914323Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.3914644Z finally:
2021-07-06T06:32:25.3914985Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.3915285Z
2021-07-06T06:32:25.3915547Z # get the shape signature
2021-07-06T06:32:25.3916030Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.3916380Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.3916953Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.3917364Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3917850Z print("func_args = ", func_args)
2021-07-06T06:32:25.3918179Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.3918557Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.3918922Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.3919296Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.3919643Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.3919978Z parfor.get_shape_classes,
2021-07-06T06:32:25.3920259Z num_inputs,
2021-07-06T06:32:25.3920543Z num_reductions,
2021-07-06T06:32:25.3920811Z func_args,
2021-07-06T06:32:25.3921091Z redargstartdim,
2021-07-06T06:32:25.3921356Z func_sig,
2021-07-06T06:32:25.3921616Z parfor.races,
2021-07-06T06:32:25.3921893Z typemap)
2021-07-06T06:32:25.3922181Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3922539Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.3922813Z
2021-07-06T06:32:25.3923143Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.3923658Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.3924054Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3924396Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.3924744Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.3925069Z call_parallel_gufunc(
2021-07-06T06:32:25.3925336Z lowerer,
2021-07-06T06:32:25.3925597Z func,
2021-07-06T06:32:25.3925850Z gu_signature,
2021-07-06T06:32:25.3926126Z func_sig,
2021-07-06T06:32:25.3926382Z func_args,
2021-07-06T06:32:25.3927388Z func_arg_types,
2021-07-06T06:32:25.3927752Z loop_ranges,
2021-07-06T06:32:25.3928022Z parfor_redvars,
2021-07-06T06:32:25.3928327Z parfor_reddict,
2021-07-06T06:32:25.3928588Z redarrs,
2021-07-06T06:32:25.3929090Z parfor.init_block,
2021-07-06T06:32:25.3929382Z index_var_typ,
2021-07-06T06:32:25.3929677Z parfor.races,
2021-07-06T06:32:25.3929968Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.3930123Z
2021-07-06T06:32:25.3930910Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.3931463Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3931691Z
2021-07-06T06:32:25.3932001Z lowerer = <numba.core.lowering.Lower object at 0x7f16ad968290>
2021-07-06T06:32:25.3932688Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16ad6e1d90>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.3933675Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.3934204Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.3934812Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.3935256Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.3935646Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.3936281Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.3936776Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.3936973Z
2021-07-06T06:32:25.3937307Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.3937820Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.3938279Z exp_name_to_tuple_var):
2021-07-06T06:32:25.3938920Z '''
2021-07-06T06:32:25.3939246Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.3939710Z '''
2021-07-06T06:32:25.3939982Z context = lowerer.context
2021-07-06T06:32:25.3940293Z builder = lowerer.builder
2021-07-06T06:32:25.3940540Z
2021-07-06T06:32:25.3940834Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.3941217Z get_thread_count,
2021-07-06T06:32:25.3941729Z _launch_threads)
2021-07-06T06:32:25.3942005Z
2021-07-06T06:32:25.3942258Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.3942583Z print("make_parallel_loop")
2021-07-06T06:32:25.3942932Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.3943314Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.3943647Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.3943981Z print("expr_args", expr_args)
2021-07-06T06:32:25.3944303Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.3945146Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.3945544Z
2021-07-06T06:32:25.3945956Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.3947198Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.3947802Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.3948340Z sin, sout = gu_signature
2021-07-06T06:32:25.3948933Z
2021-07-06T06:32:25.3949276Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.3949643Z > _launch_threads()
2021-07-06T06:32:25.3949783Z
2021-07-06T06:32:25.3950570Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.3951459Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.3951703Z
2021-07-06T06:32:25.3951978Z def _launch_threads():
2021-07-06T06:32:25.3952318Z if not _backend_init_process_lock:
2021-07-06T06:32:25.3952921Z _set_init_process_lock()
2021-07-06T06:32:25.3953369Z
2021-07-06T06:32:25.3953669Z with _backend_init_process_lock:
2021-07-06T06:32:25.3954040Z with _backend_init_thread_lock:
2021-07-06T06:32:25.3954405Z global _is_initialized
2021-07-06T06:32:25.3954736Z if _is_initialized:
2021-07-06T06:32:25.3955191Z return
2021-07-06T06:32:25.3955444Z
2021-07-06T06:32:25.3955740Z def select_known_backend(backend):
2021-07-06T06:32:25.3956085Z """
2021-07-06T06:32:25.3956426Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.3956785Z """
2021-07-06T06:32:25.3957055Z lib = None
2021-07-06T06:32:25.3957410Z if backend.startswith("tbb"):
2021-07-06T06:32:25.3957757Z try:
2021-07-06T06:32:25.3958126Z # check if TBB is present and compatible
2021-07-06T06:32:25.3958521Z _check_tbb_version_compatible()
2021-07-06T06:32:25.3959623Z # now try and load the backend
2021-07-06T06:32:25.3960109Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.3960679Z except ImportError:
2021-07-06T06:32:25.3961771Z pass
2021-07-06T06:32:25.3962290Z elif backend.startswith("omp"):
2021-07-06T06:32:25.3962734Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.3963853Z # that understands GNU OMP might be present
2021-07-06T06:32:25.3965602Z try:
2021-07-06T06:32:25.3966158Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.3966561Z except ImportError:
2021-07-06T06:32:25.3966889Z pass
2021-07-06T06:32:25.3967264Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.3967675Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.3968020Z else:
2021-07-06T06:32:25.3968434Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.3968867Z raise ValueError(msg % backend)
2021-07-06T06:32:25.3969373Z return lib
2021-07-06T06:32:25.3969623Z
2021-07-06T06:32:25.3969949Z def select_from_backends(backends):
2021-07-06T06:32:25.3970292Z """
2021-07-06T06:32:25.3970671Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.3971037Z """
2021-07-06T06:32:25.3971338Z lib = None
2021-07-06T06:32:25.3971678Z for backend in backends:
2021-07-06T06:32:25.3972064Z lib = select_known_backend(backend)
2021-07-06T06:32:25.3972654Z if lib is not None:
2021-07-06T06:32:25.3972995Z break
2021-07-06T06:32:25.3973312Z else:
2021-07-06T06:32:25.3973909Z backend = ''
2021-07-06T06:32:25.3974265Z return lib, backend
2021-07-06T06:32:25.3974532Z
2021-07-06T06:32:25.3974836Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.3975407Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.3975717Z
2021-07-06T06:32:25.3975982Z lib = None
2021-07-06T06:32:25.3976279Z err_helpers = dict()
2021-07-06T06:32:25.3976887Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.3977354Z "$ conda/pip install tbb")
2021-07-06T06:32:25.3978054Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.3979671Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.3980451Z requirements = []
2021-07-06T06:32:25.3980721Z
2021-07-06T06:32:25.3981038Z def raise_with_hint(required):
2021-07-06T06:32:25.3981447Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.3981842Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.3982230Z if len(required) == 0:
2021-07-06T06:32:25.3982979Z hint = ''
2021-07-06T06:32:25.3983342Z if len(required) == 1:
2021-07-06T06:32:25.3983718Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.3984111Z if len(required) > 1:
2021-07-06T06:32:25.3984842Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.3985335Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.3985742Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.3986033Z
2021-07-06T06:32:25.3986305Z if t in namedbackends:
2021-07-06T06:32:25.3986667Z # Try and load the specific named backend
2021-07-06T06:32:25.3987046Z lib = select_known_backend(t)
2021-07-06T06:32:25.3987375Z if not lib:
2021-07-06T06:32:25.3987765Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.3988176Z # loading, set requirements for hinting
2021-07-06T06:32:25.3988727Z if t == 'tbb':
2021-07-06T06:32:25.3989249Z requirements.append('TBB')
2021-07-06T06:32:25.3989817Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.3990561Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3990920Z libname = t
2021-07-06T06:32:25.3991466Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.3991897Z # User wants a specific behaviour...
2021-07-06T06:32:25.3992389Z available = ['tbb']
2021-07-06T06:32:25.3992875Z requirements.append('TBB')
2021-07-06T06:32:25.3993237Z if t == "safe":
2021-07-06T06:32:25.3993622Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.3993997Z pass
2021-07-06T06:32:25.3994318Z elif t == "threadsafe":
2021-07-06T06:32:25.3994800Z if _IS_OSX:
2021-07-06T06:32:25.3995340Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.3995735Z # omp is threadsafe everywhere
2021-07-06T06:32:25.3996250Z available.append('omp')
2021-07-06T06:32:25.3996622Z elif t == "forksafe":
2021-07-06T06:32:25.3997134Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.3997605Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.3997993Z # this to workqueue
2021-07-06T06:32:25.3998329Z if not _IS_LINUX:
2021-07-06T06:32:25.3998888Z available.append('omp')
2021-07-06T06:32:25.3999238Z if _IS_OSX:
2021-07-06T06:32:25.3999775Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4000366Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.4001348Z available.append('workqueue')
2021-07-06T06:32:25.4001923Z else: # unreachable
2021-07-06T06:32:25.4002501Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.4003066Z raise ValueError(msg % t)
2021-07-06T06:32:25.4003591Z # select amongst available
2021-07-06T06:32:25.4004292Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.4005173Z elif t == 'default':
2021-07-06T06:32:25.4005566Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.4006133Z # workqueue
2021-07-06T06:32:25.4006512Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.4006886Z if not lib:
2021-07-06T06:32:25.4007253Z # set requirements for hinting
2021-07-06T06:32:25.4007792Z requirements.append('TBB')
2021-07-06T06:32:25.4008390Z if _IS_OSX:
2021-07-06T06:32:25.4009102Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4009940Z else:
2021-07-06T06:32:25.4010806Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.4011248Z raise ValueError(msg % t)
2021-07-06T06:32:25.4011516Z
2021-07-06T06:32:25.4011961Z # No lib found, raise and hint
2021-07-06T06:32:25.4012306Z if not lib:
2021-07-06T06:32:25.4012639Z > raise_with_hint(requirements)
2021-07-06T06:32:25.4012836Z
2021-07-06T06:32:25.4013477Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.4014397Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4014677Z
2021-07-06T06:32:25.4015151Z required = ['TBB']
2021-07-06T06:32:25.4015288Z
2021-07-06T06:32:25.4015584Z def raise_with_hint(required):
2021-07-06T06:32:25.4015948Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.4016537Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.4016858Z if len(required) == 0:
2021-07-06T06:32:25.4017349Z hint = ''
2021-07-06T06:32:25.4017665Z if len(required) == 1:
2021-07-06T06:32:25.4018009Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.4018370Z if len(required) > 1:
2021-07-06T06:32:25.4018935Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.4019389Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.4019757Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.4020348Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.4020878Z E HINT:
2021-07-06T06:32:25.4021424Z E Intel TBB is required, try:
2021-07-06T06:32:25.4022491Z E $ conda/pip install tbb
2021-07-06T06:32:25.4022705Z
2021-07-06T06:32:25.4023487Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.4023809Z
2021-07-06T06:32:25.4024348Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.4024920Z
2021-07-06T06:32:25.4025159Z @pytest.fixture
2021-07-06T06:32:25.4025432Z def adatas():
2021-07-06T06:32:25.4025727Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.4026018Z n_split = 500
2021-07-06T06:32:25.4026415Z adata_ref = sc.AnnData(pbmc.X[:n_split, :], obs=pbmc.obs.iloc[:n_split])
2021-07-06T06:32:25.4026870Z adata_new = sc.AnnData(pbmc.X[n_split:, :])
2021-07-06T06:32:25.4027189Z
2021-07-06T06:32:25.4027427Z sc.pp.pca(adata_ref)
2021-07-06T06:32:25.4027731Z > sc.pp.neighbors(adata_ref)
2021-07-06T06:32:25.4027879Z
2021-07-06T06:32:25.4028536Z scanpy/tests/test_ingest.py:34:
2021-07-06T06:32:25.4028973Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4029599Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.4030143Z random_state=random_state,
2021-07-06T06:32:25.4030683Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.4031046Z self.n_neighbors,
2021-07-06T06:32:25.4031588Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.4031983Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.4032686Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.4033169Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.4034268Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.4034898Z raise e
2021-07-06T06:32:25.4036403Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.4036978Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.4037738Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.4038242Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.4039697Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.4040207Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.4041106Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.4041594Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.4042318Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.4042944Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.4044355Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.4044899Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.4045715Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.4046182Z return self._compile_bytecode()
2021-07-06T06:32:25.4046893Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.4047352Z return self._compile_core()
2021-07-06T06:32:25.4048035Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.4048457Z raise e
2021-07-06T06:32:25.4049112Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.4049751Z pm.run(self.state)
2021-07-06T06:32:25.4050459Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.4051088Z raise patched_exception
2021-07-06T06:32:25.4051812Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.4052322Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.4053065Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.4053575Z return func(*args, **kwargs)
2021-07-06T06:32:25.4054287Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.4054818Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.4055562Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.4056069Z mangled = func(compiler_state)
2021-07-06T06:32:25.4056771Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.4057267Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.4057966Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.4058431Z lower.lower()
2021-07-06T06:32:25.4059084Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.4059580Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.4060851Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.4061429Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.4062357Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.4062839Z self.lower_block(block)
2021-07-06T06:32:25.4063497Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.4063953Z self.lower_inst(inst)
2021-07-06T06:32:25.4064675Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.4065761Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.4066208Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4066431Z
2021-07-06T06:32:25.4066977Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.4068047Z kwargs = {'inst': id=12[LoopNest(index_variable = parfor_index.574, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/ho...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.4069502Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.4070411Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.4071614Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...r_index.574, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.4072302Z tb = None
2021-07-06T06:32:25.4072428Z
2021-07-06T06:32:25.4072666Z @contextlib.contextmanager
2021-07-06T06:32:25.4073193Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.4073539Z """
2021-07-06T06:32:25.4073877Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.4074348Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.4074900Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.4075550Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.4075892Z constructor.
2021-07-06T06:32:25.4076246Z
2021-07-06T06:32:25.4076568Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.4077019Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.4077449Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.4077792Z """
2021-07-06T06:32:25.4078277Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.4078575Z
2021-07-06T06:32:25.4079001Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.4079404Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.4080693Z loc_info.update(kwargs)
2021-07-06T06:32:25.4081031Z
2021-07-06T06:32:25.4081282Z try:
2021-07-06T06:32:25.4081535Z yield
2021-07-06T06:32:25.4081841Z except NumbaError as e:
2021-07-06T06:32:25.4082200Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.4082517Z raise
2021-07-06T06:32:25.4082819Z except Exception as e:
2021-07-06T06:32:25.4083200Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.4083667Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.4084065Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.4084935Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.4085838Z E No threading layer could be loaded.
2021-07-06T06:32:25.4086723Z E HINT:
2021-07-06T06:32:25.4087235Z E Intel TBB is required, try:
2021-07-06T06:32:25.4087795Z E $ conda/pip install tbb
2021-07-06T06:32:25.4088240Z E 
2021-07-06T06:32:25.4089444Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.4090659Z E def compute_membership_strengths(
2021-07-06T06:32:25.4091237Z E <source elided>
2021-07-06T06:32:25.4091696Z E 
2021-07-06T06:32:25.4092242Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.4092777Z E ^
2021-07-06T06:32:25.4093203Z E 
2021-07-06T06:32:25.4094992Z E During: lowering "id=12[LoopNest(index_variable = parfor_index.574, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.574, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.4096103Z
2021-07-06T06:32:25.4096779Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.4097522Z ---------------------------- Captured stderr setup -----------------------------
2021-07-06T06:32:25.4097913Z computing PCA
2021-07-06T06:32:25.4098164Z with n_comps=50
2021-07-06T06:32:25.4098457Z finished (0:00:00)
2021-07-06T06:32:25.4098732Z computing neighbors
2021-07-06T06:32:25.4099193Z using 'X_pca' with n_pcs = 50
2021-07-06T06:32:25.4099815Z ____________________ ERROR at setup of test_ingest_function ____________________
2021-07-06T06:32:25.4100081Z
2021-07-06T06:32:25.4100543Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.4102284Z kwargs = {'inst': id=16[LoopNest(index_variable = parfor_index.755, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/ho...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.4104064Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.4105633Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.4107478Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...r_index.755, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.4108226Z tb = None
2021-07-06T06:32:25.4108502Z
2021-07-06T06:32:25.4108739Z @contextlib.contextmanager
2021-07-06T06:32:25.4109097Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.4109409Z """
2021-07-06T06:32:25.4109735Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.4110188Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.4110621Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.4111063Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.4111403Z constructor.
2021-07-06T06:32:25.4111647Z
2021-07-06T06:32:25.4111966Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.4112596Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.4113043Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.4113562Z """
2021-07-06T06:32:25.4114042Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.4114358Z
2021-07-06T06:32:25.4114768Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.4115174Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.4115586Z loc_info.update(kwargs)
2021-07-06T06:32:25.4116023Z
2021-07-06T06:32:25.4116352Z try:
2021-07-06T06:32:25.4116758Z > yield
2021-07-06T06:32:25.4116880Z
2021-07-06T06:32:25.4117489Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.4117995Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4118235Z
2021-07-06T06:32:25.4118515Z self = <numba.core.lowering.Lower object at 0x7f16ad401210>
2021-07-06T06:32:25.4119351Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.4119641Z
2021-07-06T06:32:25.4119902Z def lower_block(self, block):
2021-07-06T06:32:25.4120202Z """
2021-07-06T06:32:25.4120456Z Lower the given block.
2021-07-06T06:32:25.4120708Z """
2021-07-06T06:32:25.4120977Z self.pre_block(block)
2021-07-06T06:32:25.4122142Z for inst in block.body:
2021-07-06T06:32:25.4122488Z self.loc = inst.loc
2021-07-06T06:32:25.4122826Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.4123557Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.4124032Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.4124447Z > self.lower_inst(inst)
2021-07-06T06:32:25.4124604Z
2021-07-06T06:32:25.4125204Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.4125745Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4125966Z
2021-07-06T06:32:25.4126413Z self = <numba.core.lowering.Lower object at 0x7f16ad401210>
2021-07-06T06:32:25.4127520Z inst = id=16[LoopNest(index_variable = parfor_index.755, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.755, umap_.py:404)
2021-07-06T06:32:25.4128060Z
2021-07-06T06:32:25.4128336Z def lower_inst(self, inst):
2021-07-06T06:32:25.4128689Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.4129091Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.4129430Z self.debug_print(str(inst))
2021-07-06T06:32:25.4129755Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.4130114Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.4130452Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.4130805Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.4131075Z
2021-07-06T06:32:25.4131375Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.4131722Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.4132063Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.4132381Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.4132659Z
2021-07-06T06:32:25.4132929Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.4133316Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.4133799Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.4134214Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.4134498Z
2021-07-06T06:32:25.4134772Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.4135128Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.4135453Z self.builder.branch(target)
2021-07-06T06:32:25.4136262Z
2021-07-06T06:32:25.4136576Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.4137115Z if self.generator_info:
2021-07-06T06:32:25.4137609Z # StopIteration
2021-07-06T06:32:25.4137935Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.4138265Z return
2021-07-06T06:32:25.4138561Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.4138916Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.4139232Z ty = self.fndesc.restype
2021-07-06T06:32:25.4139614Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.4139972Z # If returning an optional type
2021-07-06T06:32:25.4140372Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.4140879Z return
2021-07-06T06:32:25.4141298Z assert ty == oty, (
2021-07-06T06:32:25.4141959Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.4142386Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.4142800Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.4143081Z
2021-07-06T06:32:25.4143420Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.4143775Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4144112Z assert signature is not None
2021-07-06T06:32:25.4144387Z try:
2021-07-06T06:32:25.4145509Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.4146090Z except NotImplementedError:
2021-07-06T06:32:25.4146619Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.4147021Z inst.value, signature)
2021-07-06T06:32:25.4147341Z else:
2021-07-06T06:32:25.4147658Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.4148003Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.4148587Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.4148958Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.4149468Z signature.args[2])
2021-07-06T06:32:25.4149846Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.4150336Z
2021-07-06T06:32:25.4151331Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.4151773Z self.lower_print(inst)
2021-07-06T06:32:25.4152037Z
2021-07-06T06:32:25.4152328Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.4153431Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4153797Z assert signature is not None
2021-07-06T06:32:25.4154209Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.4154605Z signature)
2021-07-06T06:32:25.4154910Z
2021-07-06T06:32:25.4155203Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.4155592Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4155937Z assert signature is not None
2021-07-06T06:32:25.4156326Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.4156678Z
2021-07-06T06:32:25.4156969Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.4157354Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.4157712Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.4158010Z
2021-07-06T06:32:25.4158295Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.4158677Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.4159865Z
2021-07-06T06:32:25.4160420Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4160756Z assert signature is not None
2021-07-06T06:32:25.4161024Z
2021-07-06T06:32:25.4161664Z op = operator.delitem
2021-07-06T06:32:25.4162222Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.4162620Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.4163700Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.4164059Z )
2021-07-06T06:32:25.4164734Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.4165138Z
2021-07-06T06:32:25.4165421Z assert targetty == signature.args[0]
2021-07-06T06:32:25.4165802Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.4166216Z signature.args[1])
2021-07-06T06:32:25.4166510Z
2021-07-06T06:32:25.4166816Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.4167282Z
2021-07-06T06:32:25.4167581Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.4168067Z self.delvar(inst.value)
2021-07-06T06:32:25.4168343Z
2021-07-06T06:32:25.4168623Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.4168979Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.4169340Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.4169869Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4170169Z
2021-07-06T06:32:25.4170453Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.4170981Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.4171310Z assert signature is not None
2021-07-06T06:32:25.4171653Z assert signature.args[0] == targetty
2021-07-06T06:32:25.4172018Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.4172338Z
2021-07-06T06:32:25.4172594Z # Convert argument to match
2021-07-06T06:32:25.4173347Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.4173936Z signature.args[1])
2021-07-06T06:32:25.4174222Z
2021-07-06T06:32:25.4201588Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.4202639Z
2021-07-06T06:32:25.4203465Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.4203912Z self.lower_static_raise(inst)
2021-07-06T06:32:25.4204177Z
2021-07-06T06:32:25.4204472Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.4204849Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.4205114Z
2021-07-06T06:32:25.4205353Z else:
2021-07-06T06:32:25.4205683Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.4206098Z if isinstance(inst, _class):
2021-07-06T06:32:25.4206434Z > func(self, inst)
2021-07-06T06:32:25.4206599Z
2021-07-06T06:32:25.4208021Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.4208567Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4208810Z
2021-07-06T06:32:25.4209094Z lowerer = <numba.core.lowering.Lower object at 0x7f16ad401210>
2021-07-06T06:32:25.4210169Z parfor = id=16[LoopNest(index_variable = parfor_index.755, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.755, umap_.py:404)
2021-07-06T06:32:25.4210734Z
2021-07-06T06:32:25.4211451Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.4211881Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.4212259Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.4212637Z The general approach is as follows:
2021-07-06T06:32:25.4213265Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.4213674Z in the context of the current function.
2021-07-06T06:32:25.4214063Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.4214484Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.4214915Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.4215324Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.4216005Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.4216539Z the final reduction values.
2021-07-06T06:32:25.4216826Z """
2021-07-06T06:32:25.4217128Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.4217434Z
2021-07-06T06:32:25.4217680Z ensure_parallel_support()
2021-07-06T06:32:25.4218179Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.4218504Z targetctx = lowerer.context
2021-07-06T06:32:25.4219094Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.4219562Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.4219939Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.4220668Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.4221298Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.4221757Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4222337Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.4222720Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.4223205Z varmap = lowerer.varmap
2021-07-06T06:32:25.4223474Z
2021-07-06T06:32:25.4223750Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4224092Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.4224715Z parfor.dump()
2021-07-06T06:32:25.4224956Z
2021-07-06T06:32:25.4225221Z loc = parfor.init_block.loc
2021-07-06T06:32:25.4225641Z scope = parfor.init_block.scope
2021-07-06T06:32:25.4225916Z
2021-07-06T06:32:25.4226182Z # produce instructions for init_block
2021-07-06T06:32:25.4227221Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4227644Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.4228074Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.4228432Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4228788Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.4229481Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.4229744Z
2021-07-06T06:32:25.4230036Z for racevar in parfor.races:
2021-07-06T06:32:25.4230385Z if racevar not in varmap:
2021-07-06T06:32:25.4230752Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.4231091Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.4231463Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.4231756Z
2021-07-06T06:32:25.4231993Z alias_map = {}
2021-07-06T06:32:25.4232283Z arg_aliases = {}
2021-07-06T06:32:25.4232662Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.4233555Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.4233997Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4234356Z print("alias_map", alias_map)
2021-07-06T06:32:25.4234691Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.4234982Z
2021-07-06T06:32:25.4235321Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.4235800Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.4236202Z assert parfor.params is not None
2021-07-06T06:32:25.4236469Z
2021-07-06T06:32:25.4236799Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.4237171Z parfor, parfor.params)
2021-07-06T06:32:25.4237575Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.4238030Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.4238439Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4238810Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.4239226Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.4239528Z
2021-07-06T06:32:25.4239821Z # init reduction array allocation here.
2021-07-06T06:32:25.4240155Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.4240460Z redarrs = {}
2021-07-06T06:32:25.4240912Z if nredvars > 0:
2021-07-06T06:32:25.4241274Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.4241671Z thread_count = get_thread_count()
2021-07-06T06:32:25.4242016Z scope = parfor.init_block.scope
2021-07-06T06:32:25.4242361Z loc = parfor.init_block.loc
2021-07-06T06:32:25.4242748Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.4243099Z
2021-07-06T06:32:25.4243373Z # For each reduction variable...
2021-07-06T06:32:25.4243735Z for i in range(nredvars):
2021-07-06T06:32:25.4244685Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.4245448Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.4245860Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.4246224Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.4246587Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4247026Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.4248233Z
2021-07-06T06:32:25.4248519Z # If this is reduction over an array,
2021-07-06T06:32:25.4249795Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.4251604Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.4252125Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.4252453Z else:
2021-07-06T06:32:25.4253092Z redarrdim = 1
2021-07-06T06:32:25.4253509Z
2021-07-06T06:32:25.4254092Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.4254465Z
2021-07-06T06:32:25.4254768Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.4255177Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.4256199Z fobj=np.empty,
2021-07-06T06:32:25.4256581Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.4256920Z args=(
2021-07-06T06:32:25.4257276Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.4257647Z types.DType(reddtype),
2021-07-06T06:32:25.4257968Z ),
2021-07-06T06:32:25.4258228Z )
2021-07-06T06:32:25.4258459Z
2021-07-06T06:32:25.4258836Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.4259294Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.4259666Z cval=thread_count,
2021-07-06T06:32:25.4259980Z typ=types.intp,
2021-07-06T06:32:25.4261376Z name='num_threads',
2021-07-06T06:32:25.4261733Z )
2021-07-06T06:32:25.4261992Z
2021-07-06T06:32:25.4262263Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.4262534Z
2021-07-06T06:32:25.4262835Z # If this is a reduction over an array...
2021-07-06T06:32:25.4263250Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.4263715Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.4264104Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.4264636Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.4265058Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.4265445Z name="redarr_shape",
2021-07-06T06:32:25.4265735Z )
2021-07-06T06:32:25.4265978Z
2021-07-06T06:32:25.4266349Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.4266839Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.4267368Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.4267761Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.4268175Z typ=types.intp,
2021-07-06T06:32:25.4268509Z name="redshapeonedim",
2021-07-06T06:32:25.4268831Z )
2021-07-06T06:32:25.4269144Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.4269441Z
2021-07-06T06:32:25.4269798Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.4270254Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.4270900Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.4271243Z )
2021-07-06T06:32:25.4271466Z
2021-07-06T06:32:25.4271757Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.4272181Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.4272489Z
2021-07-06T06:32:25.4272872Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.4273412Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.4273757Z )
2021-07-06T06:32:25.4273986Z
2021-07-06T06:32:25.4274641Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.4275113Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.4275412Z
2021-07-06T06:32:25.4275715Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.4276098Z if init_val is not None:
2021-07-06T06:32:25.4276728Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.4277524Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.4278368Z # First, create a variable for np.full.
2021-07-06T06:32:25.4278760Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.4279141Z fobj=np.full,
2021-07-06T06:32:25.4279487Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.4280017Z args=(
2021-07-06T06:32:25.4280768Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.4281314Z reddtype,
2021-07-06T06:32:25.4281651Z types.DType(reddtype),
2021-07-06T06:32:25.4282737Z ),
2021-07-06T06:32:25.4283706Z )
2021-07-06T06:32:25.4283970Z
2021-07-06T06:32:25.4284305Z # Then create a var with the identify value.
2021-07-06T06:32:25.4284715Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.4285115Z cval=init_val,
2021-07-06T06:32:25.4285445Z typ=reddtype,
2021-07-06T06:32:25.4285795Z name="init_val",
2021-07-06T06:32:25.4286107Z )
2021-07-06T06:32:25.4286367Z
2021-07-06T06:32:25.4287447Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.4287941Z full_call = pfbdr.call(
2021-07-06T06:32:25.4288342Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.4288708Z )
2021-07-06T06:32:25.4288971Z
2021-07-06T06:32:25.4289248Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.4289607Z rhs=full_call,
2021-07-06T06:32:25.4290600Z typ=redvar_typ,
2021-07-06T06:32:25.4291001Z name="redtoset",
2021-07-06T06:32:25.4291478Z )
2021-07-06T06:32:25.4291784Z else:
2021-07-06T06:32:25.4292130Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.4292514Z cval=init_val,
2021-07-06T06:32:25.4292845Z typ=reddtype,
2021-07-06T06:32:25.4293178Z name="redtoset",
2021-07-06T06:32:25.4293505Z )
2021-07-06T06:32:25.4293943Z else:
2021-07-06T06:32:25.4294250Z redtoset = redvar
2021-07-06T06:32:25.4294502Z
2021-07-06T06:32:25.4294823Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.4295294Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.4295785Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.4296094Z
2021-07-06T06:32:25.4296374Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.4296744Z cval=res_print_str,
2021-07-06T06:32:25.4297074Z typ=strconsttyp,
2021-07-06T06:32:25.4297493Z name="str_const",
2021-07-06T06:32:25.4297791Z )
2021-07-06T06:32:25.4298039Z
2021-07-06T06:32:25.4298331Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.4298738Z vararg=None, loc=loc)
2021-07-06T06:32:25.4299156Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.4299618Z typemap[lhs.name],
2021-07-06T06:32:25.4300069Z typemap[redvar.name])
2021-07-06T06:32:25.4300500Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.4301030Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.4301306Z
2021-07-06T06:32:25.4301515Z
2021-07-06T06:32:25.4302385Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.4303064Z for j in range(thread_count):
2021-07-06T06:32:25.4303426Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.4303810Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.4304124Z )
2021-07-06T06:32:25.4305129Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.4305474Z
2021-07-06T06:32:25.4305825Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.4306219Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.4306761Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.4307932Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.4308743Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.4309169Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.4309551Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.4309927Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.4310302Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.4310617Z try:
2021-07-06T06:32:25.4310851Z (func,
2021-07-06T06:32:25.4311113Z func_args,
2021-07-06T06:32:25.4311365Z func_sig,
2021-07-06T06:32:25.4311637Z redargstartdim,
2021-07-06T06:32:25.4311905Z func_arg_types,
2021-07-06T06:32:25.4312230Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.4313009Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.4313556Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.4313904Z finally:
2021-07-06T06:32:25.4314242Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.4314576Z
2021-07-06T06:32:25.4314831Z # get the shape signature
2021-07-06T06:32:25.4315368Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.4315716Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.4316328Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.4317172Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4317533Z print("func_args = ", func_args)
2021-07-06T06:32:25.4317899Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.4318266Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.4318666Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.4319036Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.4319423Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.4319757Z parfor.get_shape_classes,
2021-07-06T06:32:25.4320225Z num_inputs,
2021-07-06T06:32:25.4320507Z num_reductions,
2021-07-06T06:32:25.4320799Z func_args,
2021-07-06T06:32:25.4321075Z redargstartdim,
2021-07-06T06:32:25.4321347Z func_sig,
2021-07-06T06:32:25.4321634Z parfor.races,
2021-07-06T06:32:25.4321903Z typemap)
2021-07-06T06:32:25.4322219Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4322570Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.4322870Z
2021-07-06T06:32:25.4323360Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.4324356Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.4325061Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4325389Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.4325748Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.4326230Z call_parallel_gufunc(
2021-07-06T06:32:25.4326691Z lowerer,
2021-07-06T06:32:25.4326948Z func,
2021-07-06T06:32:25.4327229Z gu_signature,
2021-07-06T06:32:25.4327499Z func_sig,
2021-07-06T06:32:25.4327779Z func_args,
2021-07-06T06:32:25.4328055Z func_arg_types,
2021-07-06T06:32:25.4328335Z loop_ranges,
2021-07-06T06:32:25.4328627Z parfor_redvars,
2021-07-06T06:32:25.4328910Z parfor_reddict,
2021-07-06T06:32:25.4329196Z redarrs,
2021-07-06T06:32:25.4329472Z parfor.init_block,
2021-07-06T06:32:25.4330177Z index_var_typ,
2021-07-06T06:32:25.4330622Z parfor.races,
2021-07-06T06:32:25.4331089Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.4331246Z
2021-07-06T06:32:25.4332008Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.4332590Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4332825Z
2021-07-06T06:32:25.4333121Z lowerer = <numba.core.lowering.Lower object at 0x7f16ad401210>
2021-07-06T06:32:25.4333822Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16adb78cd0>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.4334648Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.4335219Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.4335825Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.4336304Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.4337581Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.4338599Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.4339111Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.4339324Z
2021-07-06T06:32:25.4339691Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.4340211Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.4340706Z exp_name_to_tuple_var):
2021-07-06T06:32:25.4341176Z '''
2021-07-06T06:32:25.4341710Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.4342155Z '''
2021-07-06T06:32:25.4342439Z context = lowerer.context
2021-07-06T06:32:25.4342734Z builder = lowerer.builder
2021-07-06T06:32:25.4342995Z
2021-07-06T06:32:25.4343295Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.4343834Z get_thread_count,
2021-07-06T06:32:25.4344178Z _launch_threads)
2021-07-06T06:32:25.4344770Z
2021-07-06T06:32:25.4345053Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4345363Z print("make_parallel_loop")
2021-07-06T06:32:25.4345729Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.4346097Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.4346445Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.4346761Z print("expr_args", expr_args)
2021-07-06T06:32:25.4347082Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.4347429Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.4347689Z
2021-07-06T06:32:25.4347950Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.4348288Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.4348705Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.4349045Z sin, sout = gu_signature
2021-07-06T06:32:25.4349303Z
2021-07-06T06:32:25.4349611Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.4349968Z > _launch_threads()
2021-07-06T06:32:25.4350098Z
2021-07-06T06:32:25.4350762Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.4351293Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4351508Z
2021-07-06T06:32:25.4351740Z def _launch_threads():
2021-07-06T06:32:25.4352070Z if not _backend_init_process_lock:
2021-07-06T06:32:25.4352389Z _set_init_process_lock()
2021-07-06T06:32:25.4352649Z
2021-07-06T06:32:25.4352913Z with _backend_init_process_lock:
2021-07-06T06:32:25.4353272Z with _backend_init_thread_lock:
2021-07-06T06:32:25.4353779Z global _is_initialized
2021-07-06T06:32:25.4354911Z if _is_initialized:
2021-07-06T06:32:25.4355340Z return
2021-07-06T06:32:25.4355586Z
2021-07-06T06:32:25.4355911Z def select_known_backend(backend):
2021-07-06T06:32:25.4356251Z """
2021-07-06T06:32:25.4356623Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.4356980Z """
2021-07-06T06:32:25.4357276Z lib = None
2021-07-06T06:32:25.4357625Z if backend.startswith("tbb"):
2021-07-06T06:32:25.4358001Z try:
2021-07-06T06:32:25.4358525Z # check if TBB is present and compatible
2021-07-06T06:32:25.4359105Z _check_tbb_version_compatible()
2021-07-06T06:32:25.4359508Z # now try and load the backend
2021-07-06T06:32:25.4360408Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.4360980Z except ImportError:
2021-07-06T06:32:25.4361324Z pass
2021-07-06T06:32:25.4361701Z elif backend.startswith("omp"):
2021-07-06T06:32:25.4362304Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.4362903Z # that understands GNU OMP might be present
2021-07-06T06:32:25.4363244Z try:
2021-07-06T06:32:25.4363598Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.4363971Z except ImportError:
2021-07-06T06:32:25.4364301Z pass
2021-07-06T06:32:25.4364641Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.4365035Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.4365391Z else:
2021-07-06T06:32:25.4365773Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.4366210Z raise ValueError(msg % backend)
2021-07-06T06:32:25.4366605Z return lib
2021-07-06T06:32:25.4366854Z
2021-07-06T06:32:25.4367140Z def select_from_backends(backends):
2021-07-06T06:32:25.4367474Z """
2021-07-06T06:32:25.4367811Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.4368165Z """
2021-07-06T06:32:25.4368427Z lib = None
2021-07-06T06:32:25.4368738Z for backend in backends:
2021-07-06T06:32:25.4369112Z lib = select_known_backend(backend)
2021-07-06T06:32:25.4369466Z if lib is not None:
2021-07-06T06:32:25.4369965Z break
2021-07-06T06:32:25.4370257Z else:
2021-07-06T06:32:25.4372489Z backend = ''
2021-07-06T06:32:25.4372938Z return lib, backend
2021-07-06T06:32:25.4373211Z
2021-07-06T06:32:25.4373675Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.4374253Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.4374575Z
2021-07-06T06:32:25.4374810Z lib = None
2021-07-06T06:32:25.4375288Z err_helpers = dict()
2021-07-06T06:32:25.4376028Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.4376944Z "$ conda/pip install tbb")
2021-07-06T06:32:25.4377695Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.4378577Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.4379139Z requirements = []
2021-07-06T06:32:25.4379402Z
2021-07-06T06:32:25.4379704Z def raise_with_hint(required):
2021-07-06T06:32:25.4380097Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.4380502Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.4381032Z if len(required) == 0:
2021-07-06T06:32:25.4381553Z hint = ''
2021-07-06T06:32:25.4382066Z if len(required) == 1:
2021-07-06T06:32:25.4382645Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.4383034Z if len(required) > 1:
2021-07-06T06:32:25.4383671Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.4391421Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.4391969Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.4392258Z
2021-07-06T06:32:25.4392540Z if t in namedbackends:
2021-07-06T06:32:25.4393134Z # Try and load the specific named backend
2021-07-06T06:32:25.4393510Z lib = select_known_backend(t)
2021-07-06T06:32:25.4393871Z if not lib:
2021-07-06T06:32:25.4394264Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.4394706Z # loading, set requirements for hinting
2021-07-06T06:32:25.4395379Z if t == 'tbb':
2021-07-06T06:32:25.4395957Z requirements.append('TBB')
2021-07-06T06:32:25.4396531Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.4397138Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4397492Z libname = t
2021-07-06T06:32:25.4398063Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.4398493Z # User wants a specific behaviour...
2021-07-06T06:32:25.4399004Z available = ['tbb']
2021-07-06T06:32:25.4399539Z requirements.append('TBB')
2021-07-06T06:32:25.4400423Z if t == "safe":
2021-07-06T06:32:25.4402104Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.4402751Z pass
2021-07-06T06:32:25.4403770Z elif t == "threadsafe":
2021-07-06T06:32:25.4404152Z if _IS_OSX:
2021-07-06T06:32:25.4404830Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4405229Z # omp is threadsafe everywhere
2021-07-06T06:32:25.4405777Z available.append('omp')
2021-07-06T06:32:25.4406148Z elif t == "forksafe":
2021-07-06T06:32:25.4406570Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.4407059Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.4408880Z # this to workqueue
2021-07-06T06:32:25.4409329Z if not _IS_LINUX:
2021-07-06T06:32:25.4411147Z available.append('omp')
2021-07-06T06:32:25.4411739Z if _IS_OSX:
2021-07-06T06:32:25.4412461Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4413225Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.4413952Z available.append('workqueue')
2021-07-06T06:32:25.4414357Z else: # unreachable
2021-07-06T06:32:25.4414755Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.4415170Z raise ValueError(msg % t)
2021-07-06T06:32:25.4415524Z # select amongst available
2021-07-06T06:32:25.4415901Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.4416465Z elif t == 'default':
2021-07-06T06:32:25.4416883Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.4417269Z # workqueue
2021-07-06T06:32:25.4417634Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.4418028Z if not lib:
2021-07-06T06:32:25.4418377Z # set requirements for hinting
2021-07-06T06:32:25.4418931Z requirements.append('TBB')
2021-07-06T06:32:25.4419294Z if _IS_OSX:
2021-07-06T06:32:25.4419855Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4420203Z else:
2021-07-06T06:32:25.4420796Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.4421213Z raise ValueError(msg % t)
2021-07-06T06:32:25.4421489Z
2021-07-06T06:32:25.4421783Z # No lib found, raise and hint
2021-07-06T06:32:25.4422113Z if not lib:
2021-07-06T06:32:25.4422625Z > raise_with_hint(requirements)
2021-07-06T06:32:25.4422807Z
2021-07-06T06:32:25.4423467Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.4424255Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4424673Z
2021-07-06T06:32:25.4425084Z required = ['TBB']
2021-07-06T06:32:25.4425217Z
2021-07-06T06:32:25.4425478Z def raise_with_hint(required):
2021-07-06T06:32:25.4425846Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.4426185Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.4426508Z if len(required) == 0:
2021-07-06T06:32:25.4426934Z hint = ''
2021-07-06T06:32:25.4427227Z if len(required) == 1:
2021-07-06T06:32:25.4427581Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.4427911Z if len(required) > 1:
2021-07-06T06:32:25.4428479Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.4428895Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.4429385Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.4429965Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.4430498Z E HINT:
2021-07-06T06:32:25.4431002Z E Intel TBB is required, try:
2021-07-06T06:32:25.4431532Z E $ conda/pip install tbb
2021-07-06T06:32:25.4431702Z
2021-07-06T06:32:25.4432326Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.4432632Z
2021-07-06T06:32:25.4433177Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.4433433Z
2021-07-06T06:32:25.4433674Z @pytest.fixture
2021-07-06T06:32:25.4433932Z def adatas():
2021-07-06T06:32:25.4435348Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.4435699Z n_split = 500
2021-07-06T06:32:25.4436082Z adata_ref = sc.AnnData(pbmc.X[:n_split, :], obs=pbmc.obs.iloc[:n_split])
2021-07-06T06:32:25.4436567Z adata_new = sc.AnnData(pbmc.X[n_split:, :])
2021-07-06T06:32:25.4436870Z
2021-07-06T06:32:25.4437125Z sc.pp.pca(adata_ref)
2021-07-06T06:32:25.4437412Z > sc.pp.neighbors(adata_ref)
2021-07-06T06:32:25.4437561Z
2021-07-06T06:32:25.4438126Z scanpy/tests/test_ingest.py:34:
2021-07-06T06:32:25.4438536Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4439147Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.4439496Z random_state=random_state,
2021-07-06T06:32:25.4440040Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.4440390Z self.n_neighbors,
2021-07-06T06:32:25.4440931Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.4441355Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.4442305Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.4442820Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.4443734Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.4444201Z raise e
2021-07-06T06:32:25.4444880Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.4445403Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.4446116Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.4446634Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.4448899Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.4449454Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.4450185Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.4450874Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.4451611Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.4452119Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.4452829Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.4453330Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.4454042Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.4454545Z return self._compile_bytecode()
2021-07-06T06:32:25.4455258Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.4456206Z return self._compile_core()
2021-07-06T06:32:25.4457113Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.4457553Z raise e
2021-07-06T06:32:25.4458195Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.4458653Z pm.run(self.state)
2021-07-06T06:32:25.4459316Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.4459765Z raise patched_exception
2021-07-06T06:32:25.4460453Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.4460932Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.4461670Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.4462148Z return func(*args, **kwargs)
2021-07-06T06:32:25.4462928Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.4463424Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.4464151Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.4464905Z mangled = func(compiler_state)
2021-07-06T06:32:25.4465607Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.4466054Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.4466735Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.4467156Z lower.lower()
2021-07-06T06:32:25.4467783Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.4468227Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.4469918Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.4470636Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.4471414Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.4471857Z self.lower_block(block)
2021-07-06T06:32:25.4472878Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.4473496Z self.lower_inst(inst)
2021-07-06T06:32:25.4474166Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.4474620Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.4475013Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4475262Z
2021-07-06T06:32:25.4475703Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.4476882Z kwargs = {'inst': id=16[LoopNest(index_variable = parfor_index.755, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/ho...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.4478729Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.4480734Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.4482054Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI...r_index.755, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.4482915Z tb = None
2021-07-06T06:32:25.4483025Z
2021-07-06T06:32:25.4483252Z @contextlib.contextmanager
2021-07-06T06:32:25.4483596Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.4484075Z """
2021-07-06T06:32:25.4485510Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.4486043Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.4486517Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.4486962Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.4487348Z constructor.
2021-07-06T06:32:25.4487584Z
2021-07-06T06:32:25.4487934Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.4488393Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.4488856Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.4489597Z """
2021-07-06T06:32:25.4490586Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.4490944Z
2021-07-06T06:32:25.4491373Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.4491813Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.4492222Z loc_info.update(kwargs)
2021-07-06T06:32:25.4492498Z
2021-07-06T06:32:25.4492726Z try:
2021-07-06T06:32:25.4492993Z yield
2021-07-06T06:32:25.4493286Z except NumbaError as e:
2021-07-06T06:32:25.4493655Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.4494711Z raise
2021-07-06T06:32:25.4495018Z except Exception as e:
2021-07-06T06:32:25.4495435Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.4495882Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.4496587Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.4497472Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.4498233Z E No threading layer could be loaded.
2021-07-06T06:32:25.4498749Z E HINT:
2021-07-06T06:32:25.4499312Z E Intel TBB is required, try:
2021-07-06T06:32:25.4499867Z E $ conda/pip install tbb
2021-07-06T06:32:25.4500514Z E 
2021-07-06T06:32:25.4501410Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.4502122Z E def compute_membership_strengths(
2021-07-06T06:32:25.4502639Z E <source elided>
2021-07-06T06:32:25.4503084Z E 
2021-07-06T06:32:25.4503647Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.4504322Z E ^
2021-07-06T06:32:25.4504895Z E 
2021-07-06T06:32:25.4506169Z E During: lowering "id=16[LoopNest(index_variable = parfor_index.755, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.755, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.4506926Z
2021-07-06T06:32:25.4507534Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.4508239Z ---------------------------- Captured stderr setup -----------------------------
2021-07-06T06:32:25.4508697Z computing PCA
2021-07-06T06:32:25.4509625Z with n_comps=50
2021-07-06T06:32:25.4509918Z finished (0:00:00)
2021-07-06T06:32:25.4510384Z computing neighbors
2021-07-06T06:32:25.4511239Z using 'X_pca' with n_pcs = 50
2021-07-06T06:32:25.4512034Z _________________ ERROR at setup of test_scatterplots[pca-fn0] _________________
2021-07-06T06:32:25.4512314Z
2021-07-06T06:32:25.4512755Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.4513866Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.4516787Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.4518312Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.4519911Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.4520782Z tb = None
2021-07-06T06:32:25.4520892Z
2021-07-06T06:32:25.4521552Z @contextlib.contextmanager
2021-07-06T06:32:25.4522281Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.4522607Z """
2021-07-06T06:32:25.4522956Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.4523571Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.4524037Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.4524488Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.4525014Z constructor.
2021-07-06T06:32:25.4525241Z
2021-07-06T06:32:25.4525577Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.4526011Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.4526455Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.4526781Z """
2021-07-06T06:32:25.4527358Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.4527657Z
2021-07-06T06:32:25.4528061Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.4528484Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.4529040Z loc_info.update(kwargs)
2021-07-06T06:32:25.4529309Z
2021-07-06T06:32:25.4529529Z try:
2021-07-06T06:32:25.4529967Z > yield
2021-07-06T06:32:25.4530099Z
2021-07-06T06:32:25.4530904Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.4531748Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4532177Z
2021-07-06T06:32:25.4532466Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.4533179Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.4533462Z
2021-07-06T06:32:25.4533749Z def lower_block(self, block):
2021-07-06T06:32:25.4534037Z """
2021-07-06T06:32:25.4534300Z Lower the given block.
2021-07-06T06:32:25.4534580Z """
2021-07-06T06:32:25.4534839Z self.pre_block(block)
2021-07-06T06:32:25.4535173Z for inst in block.body:
2021-07-06T06:32:25.4535888Z self.loc = inst.loc
2021-07-06T06:32:25.4536294Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.4537171Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.4537680Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.4538093Z > self.lower_inst(inst)
2021-07-06T06:32:25.4538251Z
2021-07-06T06:32:25.4538886Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.4539408Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4539638Z
2021-07-06T06:32:25.4539945Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.4541036Z inst = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.4541626Z
2021-07-06T06:32:25.4541899Z def lower_inst(self, inst):
2021-07-06T06:32:25.4542281Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.4542679Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.4543029Z self.debug_print(str(inst))
2021-07-06T06:32:25.4543382Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.4543738Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.4544100Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.4544447Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.4544995Z
2021-07-06T06:32:25.4545289Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.4545667Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.4546008Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.4546362Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.4546634Z
2021-07-06T06:32:25.4546910Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.4547476Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.4547944Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.4548374Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.4548641Z
2021-07-06T06:32:25.4548931Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.4549270Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.4549605Z self.builder.branch(target)
2021-07-06T06:32:25.4549861Z
2021-07-06T06:32:25.4550137Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.4550500Z if self.generator_info:
2021-07-06T06:32:25.4550810Z # StopIteration
2021-07-06T06:32:25.4551156Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.4551589Z return
2021-07-06T06:32:25.4551999Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.4552333Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.4552672Z ty = self.fndesc.restype
2021-07-06T06:32:25.4553013Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.4554257Z # If returning an optional type
2021-07-06T06:32:25.4554712Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.4555076Z return
2021-07-06T06:32:25.4555550Z assert ty == oty, (
2021-07-06T06:32:25.4556401Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.4556879Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.4557292Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.4557610Z
2021-07-06T06:32:25.4558244Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.4558815Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4559329Z assert signature is not None
2021-07-06T06:32:25.4559991Z try:
2021-07-06T06:32:25.4560557Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.4561160Z except NotImplementedError:
2021-07-06T06:32:25.4561554Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.4561969Z inst.value, signature)
2021-07-06T06:32:25.4562329Z else:
2021-07-06T06:32:25.4562866Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.4563239Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.4563596Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.4563994Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.4564395Z signature.args[2])
2021-07-06T06:32:25.4564802Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.4565111Z
2021-07-06T06:32:25.4565404Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.4565729Z self.lower_print(inst)
2021-07-06T06:32:25.4565979Z
2021-07-06T06:32:25.4566274Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.4566628Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4566975Z assert signature is not None
2021-07-06T06:32:25.4567340Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.4567909Z signature)
2021-07-06T06:32:25.4568190Z
2021-07-06T06:32:25.4568495Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.4568866Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4569376Z assert signature is not None
2021-07-06T06:32:25.4569757Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.4570077Z
2021-07-06T06:32:25.4570374Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.4570726Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.4571087Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.4571586Z
2021-07-06T06:32:25.4571886Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.4572246Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.4572547Z
2021-07-06T06:32:25.4573203Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4574472Z assert signature is not None
2021-07-06T06:32:25.4574773Z
2021-07-06T06:32:25.4575020Z op = operator.delitem
2021-07-06T06:32:25.4575553Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.4575927Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.4576470Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.4576793Z )
2021-07-06T06:32:25.4577127Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.4577428Z
2021-07-06T06:32:25.4577706Z assert targetty == signature.args[0]
2021-07-06T06:32:25.4578104Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.4578500Z signature.args[1])
2021-07-06T06:32:25.4578810Z
2021-07-06T06:32:25.4579099Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.4579408Z
2021-07-06T06:32:25.4579689Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.4580040Z self.delvar(inst.value)
2021-07-06T06:32:25.4580468Z
2021-07-06T06:32:25.4580763Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.4581302Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.4581663Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.4582042Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.4582325Z
2021-07-06T06:32:25.4582711Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.4583073Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.4583431Z assert signature is not None
2021-07-06T06:32:25.4583769Z assert signature.args[0] == targetty
2021-07-06T06:32:25.4584159Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.4584469Z
2021-07-06T06:32:25.4584890Z # Convert argument to match
2021-07-06T06:32:25.4586412Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.4586841Z signature.args[1])
2021-07-06T06:32:25.4587158Z
2021-07-06T06:32:25.4587446Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.4587753Z
2021-07-06T06:32:25.4588063Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.4588441Z self.lower_static_raise(inst)
2021-07-06T06:32:25.4588709Z
2021-07-06T06:32:25.4589215Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.4589577Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.4589842Z
2021-07-06T06:32:25.4590079Z else:
2021-07-06T06:32:25.4590410Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.4590821Z if isinstance(inst, _class):
2021-07-06T06:32:25.4591547Z > func(self, inst)
2021-07-06T06:32:25.4591728Z
2021-07-06T06:32:25.4592473Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.4592988Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4593398Z
2021-07-06T06:32:25.4593696Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.4594818Z parfor = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.4595411Z
2021-07-06T06:32:25.4595714Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.4596133Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.4596525Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.4596916Z The general approach is as follows:
2021-07-06T06:32:25.4598265Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.4598752Z in the context of the current function.
2021-07-06T06:32:25.4599151Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.4599588Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.4600206Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.4600630Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.4601085Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.4601459Z the final reduction values.
2021-07-06T06:32:25.4601752Z """
2021-07-06T06:32:25.4602268Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.4602576Z
2021-07-06T06:32:25.4602821Z ensure_parallel_support()
2021-07-06T06:32:25.4603156Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.4603479Z targetctx = lowerer.context
2021-07-06T06:32:25.4604100Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.4604562Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.4605120Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.4605545Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.4606119Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.4606587Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4606962Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.4607346Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.4607645Z varmap = lowerer.varmap
2021-07-06T06:32:25.4607906Z
2021-07-06T06:32:25.4608169Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4608512Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.4608806Z parfor.dump()
2021-07-06T06:32:25.4609225Z
2021-07-06T06:32:25.4609498Z loc = parfor.init_block.loc
2021-07-06T06:32:25.4609812Z scope = parfor.init_block.scope
2021-07-06T06:32:25.4610092Z
2021-07-06T06:32:25.4610366Z # produce instructions for init_block
2021-07-06T06:32:25.4610728Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4611132Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.4611578Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.4611950Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4612317Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.4612684Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.4612946Z
2021-07-06T06:32:25.4613238Z for racevar in parfor.races:
2021-07-06T06:32:25.4613588Z if racevar not in varmap:
2021-07-06T06:32:25.4613978Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.4614317Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.4614689Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.4614976Z
2021-07-06T06:32:25.4615215Z alias_map = {}
2021-07-06T06:32:25.4615502Z arg_aliases = {}
2021-07-06T06:32:25.4615880Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.4616380Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.4616792Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4617146Z print("alias_map", alias_map)
2021-07-06T06:32:25.4617480Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.4617773Z
2021-07-06T06:32:25.4618877Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.4619444Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.4619836Z assert parfor.params is not None
2021-07-06T06:32:25.4620118Z
2021-07-06T06:32:25.4620433Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.4620800Z parfor, parfor.params)
2021-07-06T06:32:25.4621241Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.4621861Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.4622273Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4622650Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.4623065Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.4623368Z
2021-07-06T06:32:25.4623664Z # init reduction array allocation here.
2021-07-06T06:32:25.4623999Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.4624305Z redarrs = {}
2021-07-06T06:32:25.4624726Z if nredvars > 0:
2021-07-06T06:32:25.4625245Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.4625629Z thread_count = get_thread_count()
2021-07-06T06:32:25.4625954Z scope = parfor.init_block.scope
2021-07-06T06:32:25.4626288Z loc = parfor.init_block.loc
2021-07-06T06:32:25.4626660Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.4627001Z
2021-07-06T06:32:25.4627264Z # For each reduction variable...
2021-07-06T06:32:25.4627612Z for i in range(nredvars):
2021-07-06T06:32:25.4628096Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.4628689Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.4629091Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.4629467Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.4630177Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4631018Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.4631424Z
2021-07-06T06:32:25.4631714Z # If this is reduction over an array,
2021-07-06T06:32:25.4632461Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.4632952Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.4633769Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.4634138Z else:
2021-07-06T06:32:25.4634456Z redarrdim = 1
2021-07-06T06:32:25.4634714Z
2021-07-06T06:32:25.4635061Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.4635434Z
2021-07-06T06:32:25.4635737Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.4636147Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.4636494Z fobj=np.empty,
2021-07-06T06:32:25.4636845Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.4637168Z args=(
2021-07-06T06:32:25.4637524Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.4637896Z types.DType(reddtype),
2021-07-06T06:32:25.4638223Z ),
2021-07-06T06:32:25.4638484Z )
2021-07-06T06:32:25.4638713Z
2021-07-06T06:32:25.4639091Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.4639551Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.4639922Z cval=thread_count,
2021-07-06T06:32:25.4640234Z typ=types.intp,
2021-07-06T06:32:25.4640840Z name='num_threads',
2021-07-06T06:32:25.4641145Z )
2021-07-06T06:32:25.4641394Z
2021-07-06T06:32:25.4641674Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.4641973Z
2021-07-06T06:32:25.4642268Z # If this is a reduction over an array...
2021-07-06T06:32:25.4642692Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.4643172Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.4643741Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.4644139Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.4644565Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.4644967Z name="redarr_shape",
2021-07-06T06:32:25.4645268Z )
2021-07-06T06:32:25.4645521Z
2021-07-06T06:32:25.4645905Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.4646417Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.4646803Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.4647212Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.4647630Z typ=types.intp,
2021-07-06T06:32:25.4647977Z name="redshapeonedim",
2021-07-06T06:32:25.4648516Z )
2021-07-06T06:32:25.4648828Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.4649125Z
2021-07-06T06:32:25.4649560Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.4650018Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.4650597Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.4650934Z )
2021-07-06T06:32:25.4651156Z
2021-07-06T06:32:25.4651462Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.4651862Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.4652168Z
2021-07-06T06:32:25.4652442Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.4652803Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.4653143Z )
2021-07-06T06:32:25.4653370Z
2021-07-06T06:32:25.4653983Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.4654435Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.4654730Z
2021-07-06T06:32:25.4655020Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.4655406Z if init_val is not None:
2021-07-06T06:32:25.4655815Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.4656267Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.4656696Z # First, create a variable for np.full.
2021-07-06T06:32:25.4657085Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.4657459Z fobj=np.full,
2021-07-06T06:32:25.4657807Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.4658160Z args=(
2021-07-06T06:32:25.4658524Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.4658912Z reddtype,
2021-07-06T06:32:25.4659254Z types.DType(reddtype),
2021-07-06T06:32:25.4659590Z ),
2021-07-06T06:32:25.4659866Z )
2021-07-06T06:32:25.4660098Z
2021-07-06T06:32:25.4660662Z # Then create a var with the identify value.
2021-07-06T06:32:25.4661044Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.4661404Z cval=init_val,
2021-07-06T06:32:25.4661711Z typ=reddtype,
2021-07-06T06:32:25.4662035Z name="init_val",
2021-07-06T06:32:25.4662320Z )
2021-07-06T06:32:25.4662561Z
2021-07-06T06:32:25.4663086Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.4663969Z full_call = pfbdr.call(
2021-07-06T06:32:25.4664353Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.4664874Z )
2021-07-06T06:32:25.4665282Z
2021-07-06T06:32:25.4665540Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.4665877Z rhs=full_call,
2021-07-06T06:32:25.4666187Z typ=redvar_typ,
2021-07-06T06:32:25.4666517Z name="redtoset",
2021-07-06T06:32:25.4667663Z )
2021-07-06T06:32:25.4668163Z else:
2021-07-06T06:32:25.4668511Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.4668892Z cval=init_val,
2021-07-06T06:32:25.4669223Z typ=reddtype,
2021-07-06T06:32:25.4669557Z name="redtoset",
2021-07-06T06:32:25.4669895Z )
2021-07-06T06:32:25.4670177Z else:
2021-07-06T06:32:25.4670650Z redtoset = redvar
2021-07-06T06:32:25.4672187Z
2021-07-06T06:32:25.4672710Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.4673364Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.4673876Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.4674197Z
2021-07-06T06:32:25.4674504Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.4674867Z cval=res_print_str,
2021-07-06T06:32:25.4675210Z typ=strconsttyp,
2021-07-06T06:32:25.4675566Z name="str_const",
2021-07-06T06:32:25.4675873Z )
2021-07-06T06:32:25.4676132Z
2021-07-06T06:32:25.4676437Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.4676874Z vararg=None, loc=loc)
2021-07-06T06:32:25.4677310Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.4677795Z typemap[lhs.name],
2021-07-06T06:32:25.4678265Z typemap[redvar.name])
2021-07-06T06:32:25.4679408Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.4679799Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.4680104Z
2021-07-06T06:32:25.4680314Z
2021-07-06T06:32:25.4681054Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.4681712Z for j in range(thread_count):
2021-07-06T06:32:25.4682083Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.4682501Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.4682826Z )
2021-07-06T06:32:25.4683550Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.4683877Z
2021-07-06T06:32:25.4684214Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.4684592Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.4685104Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.4685896Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.4687155Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.4687651Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.4688053Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.4688456Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.4689026Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.4689369Z try:
2021-07-06T06:32:25.4689622Z (func,
2021-07-06T06:32:25.4689911Z func_args,
2021-07-06T06:32:25.4690180Z func_sig,
2021-07-06T06:32:25.4690472Z redargstartdim,
2021-07-06T06:32:25.4690760Z func_arg_types,
2021-07-06T06:32:25.4691113Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.4691560Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.4691973Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.4692318Z finally:
2021-07-06T06:32:25.4692658Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.4693707Z
2021-07-06T06:32:25.4693981Z # get the shape signature
2021-07-06T06:32:25.4694597Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.4694952Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.4695579Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.4696482Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4696825Z print("func_args = ", func_args)
2021-07-06T06:32:25.4697185Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.4697550Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.4697948Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.4698319Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.4698695Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.4699026Z parfor.get_shape_classes,
2021-07-06T06:32:25.4699339Z num_inputs,
2021-07-06T06:32:25.4699617Z num_reductions,
2021-07-06T06:32:25.4699911Z func_args,
2021-07-06T06:32:25.4700186Z redargstartdim,
2021-07-06T06:32:25.4700461Z func_sig,
2021-07-06T06:32:25.4700753Z parfor.races,
2021-07-06T06:32:25.4701022Z typemap)
2021-07-06T06:32:25.4701411Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4701765Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.4702118Z
2021-07-06T06:32:25.4702445Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.4703609Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.4704084Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4704439Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.4704959Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.4705283Z call_parallel_gufunc(
2021-07-06T06:32:25.4705577Z lowerer,
2021-07-06T06:32:25.4705832Z func,
2021-07-06T06:32:25.4706114Z gu_signature,
2021-07-06T06:32:25.4706383Z func_sig,
2021-07-06T06:32:25.4706843Z func_args,
2021-07-06T06:32:25.4707109Z func_arg_types,
2021-07-06T06:32:25.4707377Z loop_ranges,
2021-07-06T06:32:25.4707780Z parfor_redvars,
2021-07-06T06:32:25.4708060Z parfor_reddict,
2021-07-06T06:32:25.4708336Z redarrs,
2021-07-06T06:32:25.4708602Z parfor.init_block,
2021-07-06T06:32:25.4708894Z index_var_typ,
2021-07-06T06:32:25.4709162Z parfor.races,
2021-07-06T06:32:25.4709457Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.4709608Z
2021-07-06T06:32:25.4710533Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.4711111Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4711342Z
2021-07-06T06:32:25.4711637Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.4712340Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16a86e8e10>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.4713354Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.4713932Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.4714535Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.4715019Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.4715405Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.4716084Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.4716629Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.4716836Z
2021-07-06T06:32:25.4717374Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.4717881Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.4718357Z exp_name_to_tuple_var):
2021-07-06T06:32:25.4718943Z '''
2021-07-06T06:32:25.4719291Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.4719736Z '''
2021-07-06T06:32:25.4720023Z context = lowerer.context
2021-07-06T06:32:25.4720316Z builder = lowerer.builder
2021-07-06T06:32:25.4720578Z
2021-07-06T06:32:25.4720875Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.4721581Z get_thread_count,
2021-07-06T06:32:25.4721948Z _launch_threads)
2021-07-06T06:32:25.4722227Z
2021-07-06T06:32:25.4722517Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.4722850Z print("make_parallel_loop")
2021-07-06T06:32:25.4723243Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.4723646Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.4724021Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.4724364Z print("expr_args", expr_args)
2021-07-06T06:32:25.4724724Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.4725081Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.4725772Z
2021-07-06T06:32:25.4726053Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.4726417Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.4727007Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.4727526Z sin, sout = gu_signature
2021-07-06T06:32:25.4730279Z
2021-07-06T06:32:25.4730971Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.4731435Z > _launch_threads()
2021-07-06T06:32:25.4731578Z
2021-07-06T06:32:25.4732726Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.4733367Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4733611Z
2021-07-06T06:32:25.4733865Z def _launch_threads():
2021-07-06T06:32:25.4734224Z if not _backend_init_process_lock:
2021-07-06T06:32:25.4734570Z _set_init_process_lock()
2021-07-06T06:32:25.4734849Z
2021-07-06T06:32:25.4735288Z with _backend_init_process_lock:
2021-07-06T06:32:25.4735664Z with _backend_init_thread_lock:
2021-07-06T06:32:25.4736000Z global _is_initialized
2021-07-06T06:32:25.4736334Z if _is_initialized:
2021-07-06T06:32:25.4736635Z return
2021-07-06T06:32:25.4736870Z
2021-07-06T06:32:25.4737183Z def select_known_backend(backend):
2021-07-06T06:32:25.4737511Z """
2021-07-06T06:32:25.4738048Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.4738394Z """
2021-07-06T06:32:25.4738680Z lib = None
2021-07-06T06:32:25.4739020Z if backend.startswith("tbb"):
2021-07-06T06:32:25.4739382Z try:
2021-07-06T06:32:25.4739734Z # check if TBB is present and compatible
2021-07-06T06:32:25.4740122Z _check_tbb_version_compatible()
2021-07-06T06:32:25.4740932Z # now try and load the backend
2021-07-06T06:32:25.4741323Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.4741724Z except ImportError:
2021-07-06T06:32:25.4742051Z pass
2021-07-06T06:32:25.4742409Z elif backend.startswith("omp"):
2021-07-06T06:32:25.4742836Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.4743295Z # that understands GNU OMP might be present
2021-07-06T06:32:25.4743647Z try:
2021-07-06T06:32:25.4744162Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.4744687Z except ImportError:
2021-07-06T06:32:25.4745223Z pass
2021-07-06T06:32:25.4745564Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.4745959Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.4746309Z else:
2021-07-06T06:32:25.4746693Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.4747153Z raise ValueError(msg % backend)
2021-07-06T06:32:25.4747464Z return lib
2021-07-06T06:32:25.4747714Z
2021-07-06T06:32:25.4748001Z def select_from_backends(backends):
2021-07-06T06:32:25.4749067Z """
2021-07-06T06:32:25.4749572Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.4750108Z """
2021-07-06T06:32:25.4750728Z lib = None
2021-07-06T06:32:25.4751219Z for backend in backends:
2021-07-06T06:32:25.4751625Z lib = select_known_backend(backend)
2021-07-06T06:32:25.4752010Z if lib is not None:
2021-07-06T06:32:25.4752375Z break
2021-07-06T06:32:25.4753431Z else:
2021-07-06T06:32:25.4754125Z backend = ''
2021-07-06T06:32:25.4754468Z return lib, backend
2021-07-06T06:32:25.4754753Z
2021-07-06T06:32:25.4755046Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.4755615Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.4756094Z
2021-07-06T06:32:25.4756341Z lib = None
2021-07-06T06:32:25.4756644Z err_helpers = dict()
2021-07-06T06:32:25.4757598Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.4758063Z "$ conda/pip install tbb")
2021-07-06T06:32:25.4759457Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.4760173Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.4760546Z requirements = []
2021-07-06T06:32:25.4760968Z
2021-07-06T06:32:25.4761247Z def raise_with_hint(required):
2021-07-06T06:32:25.4761628Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.4762014Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.4762538Z if len(required) == 0:
2021-07-06T06:32:25.4763192Z hint = ''
2021-07-06T06:32:25.4763518Z if len(required) == 1:
2021-07-06T06:32:25.4764063Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.4764426Z if len(required) > 1:
2021-07-06T06:32:25.4765057Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.4766222Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.4766628Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.4767081Z
2021-07-06T06:32:25.4767368Z if t in namedbackends:
2021-07-06T06:32:25.4767924Z # Try and load the specific named backend
2021-07-06T06:32:25.4768298Z lib = select_known_backend(t)
2021-07-06T06:32:25.4768860Z if not lib:
2021-07-06T06:32:25.4769493Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.4769937Z # loading, set requirements for hinting
2021-07-06T06:32:25.4771038Z if t == 'tbb':
2021-07-06T06:32:25.4771772Z requirements.append('TBB')
2021-07-06T06:32:25.4772478Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.4773088Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4773441Z libname = t
2021-07-06T06:32:25.4774013Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.4774440Z # User wants a specific behaviour...
2021-07-06T06:32:25.4774968Z available = ['tbb']
2021-07-06T06:32:25.4775478Z requirements.append('TBB')
2021-07-06T06:32:25.4775833Z if t == "safe":
2021-07-06T06:32:25.4776256Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.4776629Z pass
2021-07-06T06:32:25.4776975Z elif t == "threadsafe":
2021-07-06T06:32:25.4777343Z if _IS_OSX:
2021-07-06T06:32:25.4777905Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4778294Z # omp is threadsafe everywhere
2021-07-06T06:32:25.4778840Z available.append('omp')
2021-07-06T06:32:25.4779209Z elif t == "forksafe":
2021-07-06T06:32:25.4779645Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.4780116Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.4780520Z # this to workqueue
2021-07-06T06:32:25.4780889Z if not _IS_LINUX:
2021-07-06T06:32:25.4781429Z available.append('omp')
2021-07-06T06:32:25.4781812Z if _IS_OSX:
2021-07-06T06:32:25.4782351Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4782767Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.4783324Z available.append('workqueue')
2021-07-06T06:32:25.4783714Z else: # unreachable
2021-07-06T06:32:25.4784115Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.4784995Z raise ValueError(msg % t)
2021-07-06T06:32:25.4786011Z # select amongst available
2021-07-06T06:32:25.4786434Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.4787081Z elif t == 'default':
2021-07-06T06:32:25.4788080Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.4788490Z # workqueue
2021-07-06T06:32:25.4788847Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.4789242Z if not lib:
2021-07-06T06:32:25.4789593Z # set requirements for hinting
2021-07-06T06:32:25.4790426Z requirements.append('TBB')
2021-07-06T06:32:25.4790794Z if _IS_OSX:
2021-07-06T06:32:25.4791838Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.4792184Z else:
2021-07-06T06:32:25.4792929Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.4793347Z raise ValueError(msg % t)
2021-07-06T06:32:25.4793638Z
2021-07-06T06:32:25.4793917Z # No lib found, raise and hint
2021-07-06T06:32:25.4794246Z if not lib:
2021-07-06T06:32:25.4794593Z > raise_with_hint(requirements)
2021-07-06T06:32:25.4794772Z
2021-07-06T06:32:25.4795552Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.4796085Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4796313Z
2021-07-06T06:32:25.4796687Z required = ['TBB']
2021-07-06T06:32:25.4796817Z
2021-07-06T06:32:25.4797080Z def raise_with_hint(required):
2021-07-06T06:32:25.4797448Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.4797891Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.4798217Z if len(required) == 0:
2021-07-06T06:32:25.4798667Z hint = ''
2021-07-06T06:32:25.4798962Z if len(required) == 1:
2021-07-06T06:32:25.4799316Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.4799858Z if len(required) > 1:
2021-07-06T06:32:25.4800776Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.4801212Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.4801603Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.4802538Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.4803090Z E HINT:
2021-07-06T06:32:25.4803625Z E Intel TBB is required, try:
2021-07-06T06:32:25.4804178Z E $ conda/pip install tbb
2021-07-06T06:32:25.4804355Z
2021-07-06T06:32:25.4805011Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.4805328Z
2021-07-06T06:32:25.4805898Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.4806321Z
2021-07-06T06:32:25.4806588Z @pytest.fixture(scope="module")
2021-07-06T06:32:25.4807221Z def pbmc_scatterplots():
2021-07-06T06:32:25.4808693Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.4809263Z pbmc.layers["sparse"] = pbmc.raw.X / 2
2021-07-06T06:32:25.4809616Z pbmc.layers["test"] = pbmc.X.copy() + 100
2021-07-06T06:32:25.4810019Z pbmc.var["numbers"] = [str(x) for x in range(pbmc.shape[1])]
2021-07-06T06:32:25.4810373Z > sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.4810532Z
2021-07-06T06:32:25.4811121Z scanpy/tests/test_plotting.py:949:
2021-07-06T06:32:25.4811557Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4812204Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.4812616Z random_state=random_state,
2021-07-06T06:32:25.4813203Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.4813566Z self.n_neighbors,
2021-07-06T06:32:25.4814148Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.4814560Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.4815283Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.4815790Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.4816560Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.4817171Z raise e
2021-07-06T06:32:25.4817899Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.4818478Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.4819599Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.4820190Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.4821018Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.4821557Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.4822524Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.4823032Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.4824089Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.4824917Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.4825653Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.4826143Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.4826825Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.4827305Z return self._compile_bytecode()
2021-07-06T06:32:25.4828023Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.4828503Z return self._compile_core()
2021-07-06T06:32:25.4829173Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.4829621Z raise e
2021-07-06T06:32:25.4830439Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.4830919Z pm.run(self.state)
2021-07-06T06:32:25.4831609Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.4832245Z raise patched_exception
2021-07-06T06:32:25.4833105Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.4833611Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.4834658Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.4835312Z return func(*args, **kwargs)
2021-07-06T06:32:25.4836187Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.4837416Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.4838318Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.4838842Z mangled = func(compiler_state)
2021-07-06T06:32:25.4839553Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.4840031Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.4840757Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.4841202Z lower.lower()
2021-07-06T06:32:25.4841875Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.4842353Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.4843310Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.4843827Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.4844600Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.4845074Z self.lower_block(block)
2021-07-06T06:32:25.4845819Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.4846274Z self.lower_inst(inst)
2021-07-06T06:32:25.4846911Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.4847354Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.4847766Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.4847998Z
2021-07-06T06:32:25.4848436Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.4849564Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.4851740Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.4852756Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.4853986Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.4854715Z tb = None
2021-07-06T06:32:25.4854842Z
2021-07-06T06:32:25.4855105Z @contextlib.contextmanager
2021-07-06T06:32:25.4855458Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.4855795Z """
2021-07-06T06:32:25.4856141Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.4856594Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.4857059Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.4857501Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.4857873Z constructor.
2021-07-06T06:32:25.4858107Z
2021-07-06T06:32:25.4858454Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.4858903Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.4859364Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.4859709Z """
2021-07-06T06:32:25.4860218Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.4860520Z
2021-07-06T06:32:25.4860958Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.4861379Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.4861788Z loc_info.update(kwargs)
2021-07-06T06:32:25.4862065Z
2021-07-06T06:32:25.4862291Z try:
2021-07-06T06:32:25.4862558Z yield
2021-07-06T06:32:25.4862847Z except NumbaError as e:
2021-07-06T06:32:25.4863218Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.4863536Z raise
2021-07-06T06:32:25.4863836Z except Exception as e:
2021-07-06T06:32:25.4864218Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.4864963Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.4865367Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.4866287Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.4867020Z E No threading layer could be loaded.
2021-07-06T06:32:25.4867515Z E HINT:
2021-07-06T06:32:25.4868059Z E Intel TBB is required, try:
2021-07-06T06:32:25.4868593Z E $ conda/pip install tbb
2021-07-06T06:32:25.4869067Z E 
2021-07-06T06:32:25.4869768Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.4870476Z E def compute_membership_strengths(
2021-07-06T06:32:25.4870989Z E <source elided>
2021-07-06T06:32:25.4871450Z E 
2021-07-06T06:32:25.4871998Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.4872876Z E ^
2021-07-06T06:32:25.4873303Z E 
2021-07-06T06:32:25.4874833Z E During: lowering "id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.4875757Z
2021-07-06T06:32:25.4876435Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.4877201Z ---------------------------- Captured stderr setup -----------------------------
2021-07-06T06:32:25.4877718Z --- Logging error ---
2021-07-06T06:32:25.4878052Z Traceback (most recent call last):
2021-07-06T06:32:25.4878488Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/logging/__init__.py", line 1028, in emit
2021-07-06T06:32:25.4878942Z stream.write(msg + self.terminator)
2021-07-06T06:32:25.4879274Z ValueError: I/O operation on closed file.
2021-07-06T06:32:25.4879593Z Call stack:
2021-07-06T06:32:25.4879944Z File "/opt/hostedtoolcache/Python/3.7.10/x64/bin/pytest", line 8, in <module>
2021-07-06T06:32:25.4880986Z sys.exit(console_main())
2021-07-06T06:32:25.4881879Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/config/__init__.py", line 185, in console_main
2021-07-06T06:32:25.4882370Z code = main()
2021-07-06T06:32:25.4883042Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/config/__init__.py", line 163, in main
2021-07-06T06:32:25.4884095Z config=config
2021-07-06T06:32:25.4885266Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4885799Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4886543Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4887046Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4887757Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4889065Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.4889968Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.4890665Z res = hook_impl.function(*args)
2021-07-06T06:32:25.4891486Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main
2021-07-06T06:32:25.4891992Z return wrap_session(config, _main)
2021-07-06T06:32:25.4892710Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/main.py", line 269, in wrap_session
2021-07-06T06:32:25.4893356Z session.exitstatus = doit(config, session) or 0
2021-07-06T06:32:25.4894095Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/main.py", line 323, in _main
2021-07-06T06:32:25.4894576Z config.hook.pytest_runtestloop(session=session)
2021-07-06T06:32:25.4895291Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4895784Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4896517Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4897002Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4897752Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4898266Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.4899025Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.4899602Z res = hook_impl.function(*args)
2021-07-06T06:32:25.4900318Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/main.py", line 348, in pytest_runtestloop
2021-07-06T06:32:25.4900866Z item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
2021-07-06T06:32:25.4901599Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4902109Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4902826Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4903326Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4904027Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4904704Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.4905648Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.4906452Z res = hook_impl.function(*args)
2021-07-06T06:32:25.4907426Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 109, in pytest_runtest_protocol
2021-07-06T06:32:25.4907964Z runtestprotocol(item, nextitem=nextitem)
2021-07-06T06:32:25.4908872Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 120, in runtestprotocol
2021-07-06T06:32:25.4910121Z rep = call_and_report(item, "setup", log)
2021-07-06T06:32:25.4910910Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 215, in call_and_report
2021-07-06T06:32:25.4911427Z call = call_runtest_hook(item, when, **kwds)
2021-07-06T06:32:25.4912125Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 255, in call_runtest_hook
2021-07-06T06:32:25.4912660Z lambda: ihook(item=item, **kwds), when=when, reraise=reraise
2021-07-06T06:32:25.4913618Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 311, in from_call
2021-07-06T06:32:25.4914107Z result: Optional[TResult] = func()
2021-07-06T06:32:25.4914795Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 255, in <lambda>
2021-07-06T06:32:25.4915481Z lambda: ihook(item=item, **kwds), when=when, reraise=reraise
2021-07-06T06:32:25.4916714Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4919004Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4921841Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4922364Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4923070Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4923811Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.4924581Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.4925040Z res = hook_impl.function(*args)
2021-07-06T06:32:25.4925767Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 150, in pytest_runtest_setup
2021-07-06T06:32:25.4926251Z item.session._setupstate.prepare(item)
2021-07-06T06:32:25.4926954Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 449, in prepare
2021-07-06T06:32:25.4927385Z col.setup()
2021-07-06T06:32:25.4928041Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/python.py", line 1647, in setup
2021-07-06T06:32:25.4928692Z self._request._fillfixtures()
2021-07-06T06:32:25.4930465Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 568, in _fillfixtures
2021-07-06T06:32:25.4931037Z item.funcargs[argname] = self.getfixturevalue(argname)
2021-07-06T06:32:25.4931823Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 581, in getfixturevalue
2021-07-06T06:32:25.4932325Z fixturedef = self._get_active_fixturedef(argname)
2021-07-06T06:32:25.4933087Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 601, in _get_active_fixturedef
2021-07-06T06:32:25.4933580Z self._compute_fixture_value(fixturedef)
2021-07-06T06:32:25.4934343Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 687, in _compute_fixture_value
2021-07-06T06:32:25.4934832Z fixturedef.execute(request=subrequest)
2021-07-06T06:32:25.4935547Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 1072, in execute
2021-07-06T06:32:25.4936067Z result = hook.pytest_fixture_setup(fixturedef=self, request=request)
2021-07-06T06:32:25.4936812Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4937307Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4938678Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4939739Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4941340Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4941897Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.4942664Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.4943129Z res = hook_impl.function(*args)
2021-07-06T06:32:25.4944725Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 1126, in pytest_fixture_setup
2021-07-06T06:32:25.4945287Z result = call_fixture_func(fixturefunc, request, kwargs)
2021-07-06T06:32:25.4946055Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 932, in call_fixture_func
2021-07-06T06:32:25.4946523Z fixture_result = fixturefunc(**kwargs)
2021-07-06T06:32:25.4946940Z File "/home/vsts/work/1/s/scanpy/tests/test_plotting.py", line 949, in pbmc_scatterplots
2021-07-06T06:32:25.4947313Z sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.4947846Z File "/home/vsts/work/1/s/scanpy/neighbors/__init__.py", line 134, in neighbors
2021-07-06T06:32:25.4948450Z start = logg.info('computing neighbors')
2021-07-06T06:32:25.4948830Z File "/home/vsts/work/1/s/scanpy/logging.py", line 245, in info
2021-07-06T06:32:25.4950159Z return settings._root_logger.info(msg, time=time, deep=deep, extra=extra)
2021-07-06T06:32:25.4950782Z File "/home/vsts/work/1/s/scanpy/logging.py", line 56, in info
2021-07-06T06:32:25.4951214Z return self.log(INFO, msg, time=time, deep=deep, extra=extra)
2021-07-06T06:32:25.4951620Z File "/home/vsts/work/1/s/scanpy/logging.py", line 43, in log
2021-07-06T06:32:25.4952003Z super().log(level, msg, extra=extra)
2021-07-06T06:32:25.4952594Z Message: 'computing neighbors'
2021-07-06T06:32:25.4952908Z Arguments: ()
2021-07-06T06:32:25.4953313Z --- Logging error ---
2021-07-06T06:32:25.4953628Z Traceback (most recent call last):
2021-07-06T06:32:25.4954082Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/logging/__init__.py", line 1028, in emit
2021-07-06T06:32:25.4954524Z stream.write(msg + self.terminator)
2021-07-06T06:32:25.4955318Z ValueError: I/O operation on closed file.
2021-07-06T06:32:25.4955854Z Call stack:
2021-07-06T06:32:25.4956231Z File "/opt/hostedtoolcache/Python/3.7.10/x64/bin/pytest", line 8, in <module>
2021-07-06T06:32:25.4956603Z sys.exit(console_main())
2021-07-06T06:32:25.4957419Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/config/__init__.py", line 185, in console_main
2021-07-06T06:32:25.4957875Z code = main()
2021-07-06T06:32:25.4958553Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/config/__init__.py", line 163, in main
2021-07-06T06:32:25.4958986Z config=config
2021-07-06T06:32:25.4960318Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4960833Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4961583Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4962075Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4962793Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4963310Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.4964148Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.4964606Z res = hook_impl.function(*args)
2021-07-06T06:32:25.4965478Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main
2021-07-06T06:32:25.4966657Z return wrap_session(config, _main)
2021-07-06T06:32:25.4967505Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/main.py", line 269, in wrap_session
2021-07-06T06:32:25.4968038Z session.exitstatus = doit(config, session) or 0
2021-07-06T06:32:25.4968733Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/main.py", line 323, in _main
2021-07-06T06:32:25.4970103Z config.hook.pytest_runtestloop(session=session)
2021-07-06T06:32:25.4971625Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4972147Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4972864Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4973366Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4974067Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4974601Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.4975543Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.4976030Z res = hook_impl.function(*args)
2021-07-06T06:32:25.4976722Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/main.py", line 348, in pytest_runtestloop
2021-07-06T06:32:25.4977271Z item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
2021-07-06T06:32:25.4978002Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4978513Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4979860Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4980407Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4981185Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4981727Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.4982643Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.4983122Z res = hook_impl.function(*args)
2021-07-06T06:32:25.4984226Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 109, in pytest_runtest_protocol
2021-07-06T06:32:25.4985343Z runtestprotocol(item, nextitem=nextitem)
2021-07-06T06:32:25.4986188Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 120, in runtestprotocol
2021-07-06T06:32:25.4986694Z rep = call_and_report(item, "setup", log)
2021-07-06T06:32:25.4987403Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 215, in call_and_report
2021-07-06T06:32:25.4988497Z call = call_runtest_hook(item, when, **kwds)
2021-07-06T06:32:25.4990254Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 255, in call_runtest_hook
2021-07-06T06:32:25.4991533Z lambda: ihook(item=item, **kwds), when=when, reraise=reraise
2021-07-06T06:32:25.4993077Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 311, in from_call
2021-07-06T06:32:25.4993633Z result: Optional[TResult] = func()
2021-07-06T06:32:25.4994427Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 255, in <lambda>
2021-07-06T06:32:25.4994943Z lambda: ihook(item=item, **kwds), when=when, reraise=reraise
2021-07-06T06:32:25.4995688Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.4996179Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.4996928Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.4997418Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.4998136Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.4998651Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.5000061Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.5000553Z res = hook_impl.function(*args)
2021-07-06T06:32:25.5001284Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 150, in pytest_runtest_setup
2021-07-06T06:32:25.5001768Z item.session._setupstate.prepare(item)
2021-07-06T06:32:25.5002466Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/runner.py", line 449, in prepare
2021-07-06T06:32:25.5003064Z col.setup()
2021-07-06T06:32:25.5003751Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/python.py", line 1647, in setup
2021-07-06T06:32:25.5004205Z self._request._fillfixtures()
2021-07-06T06:32:25.5004908Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 568, in _fillfixtures
2021-07-06T06:32:25.5005412Z item.funcargs[argname] = self.getfixturevalue(argname)
2021-07-06T06:32:25.5006162Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 581, in getfixturevalue
2021-07-06T06:32:25.5006658Z fixturedef = self._get_active_fixturedef(argname)
2021-07-06T06:32:25.5007415Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 601, in _get_active_fixturedef
2021-07-06T06:32:25.5007952Z self._compute_fixture_value(fixturedef)
2021-07-06T06:32:25.5008718Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 687, in _compute_fixture_value
2021-07-06T06:32:25.5009965Z fixturedef.execute(request=subrequest)
2021-07-06T06:32:25.5010743Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 1072, in execute
2021-07-06T06:32:25.5011587Z result = hook.pytest_fixture_setup(fixturedef=self, request=request)
2021-07-06T06:32:25.5012480Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
2021-07-06T06:32:25.5013121Z return self._hookexec(self, self.get_hookimpls(), kwargs)
2021-07-06T06:32:25.5014080Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
2021-07-06T06:32:25.5014563Z return self._inner_hookexec(hook, methods, kwargs)
2021-07-06T06:32:25.5015283Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
2021-07-06T06:32:25.5016021Z firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
2021-07-06T06:32:25.5016742Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
2021-07-06T06:32:25.5017202Z res = hook_impl.function(*args)
2021-07-06T06:32:25.5018072Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 1126, in pytest_fixture_setup
2021-07-06T06:32:25.5020020Z result = call_fixture_func(fixturefunc, request, kwargs)
2021-07-06T06:32:25.5021876Z File "/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 932, in call_fixture_func
2021-07-06T06:32:25.5022443Z fixture_result = fixturefunc(**kwargs)
2021-07-06T06:32:25.5022858Z File "/home/vsts/work/1/s/scanpy/tests/test_plotting.py", line 949, in pbmc_scatterplots
2021-07-06T06:32:25.5023263Z sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.5023647Z File "/home/vsts/work/1/s/scanpy/neighbors/__init__.py", line 147, in neighbors
2021-07-06T06:32:25.5024048Z random_state=random_state,
2021-07-06T06:32:25.5024444Z File "/home/vsts/work/1/s/scanpy/neighbors/__init__.py", line 770, in compute_neighbors
2021-07-06T06:32:25.5025251Z X = _choose_representation(self._adata, use_rep=use_rep, n_pcs=n_pcs)
2021-07-06T06:32:25.5025713Z File "/home/vsts/work/1/s/scanpy/tools/_utils.py", line 37, in _choose_representation
2021-07-06T06:32:25.5027179Z logg.info(f' using \'X_pca\' with n_pcs = {X.shape[1]}')
2021-07-06T06:32:25.5027782Z File "/home/vsts/work/1/s/scanpy/logging.py", line 245, in info
2021-07-06T06:32:25.5028401Z return settings._root_logger.info(msg, time=time, deep=deep, extra=extra)
2021-07-06T06:32:25.5028828Z File "/home/vsts/work/1/s/scanpy/logging.py", line 56, in info
2021-07-06T06:32:25.5029847Z return self.log(INFO, msg, time=time, deep=deep, extra=extra)
2021-07-06T06:32:25.5030455Z File "/home/vsts/work/1/s/scanpy/logging.py", line 43, in log
2021-07-06T06:32:25.5030838Z super().log(level, msg, extra=extra)
2021-07-06T06:32:25.5031434Z Message: " using 'X_pca' with n_pcs = 50"
2021-07-06T06:32:25.5031761Z Arguments: ()
2021-07-06T06:32:25.5032507Z ___________ ERROR at setup of test_scatterplots[pca_with_fonts-fn1] ____________
2021-07-06T06:32:25.5032758Z
2021-07-06T06:32:25.5034396Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.5035773Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.5037081Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.5038783Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.5041883Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.5043007Z tb = None
2021-07-06T06:32:25.5043304Z
2021-07-06T06:32:25.5043703Z @contextlib.contextmanager
2021-07-06T06:32:25.5044060Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.5044376Z """
2021-07-06T06:32:25.5044902Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.5045360Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.5046228Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.5046760Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.5047155Z constructor.
2021-07-06T06:32:25.5047392Z
2021-07-06T06:32:25.5047723Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.5048337Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.5048766Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.5049634Z """
2021-07-06T06:32:25.5050251Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.5050574Z
2021-07-06T06:32:25.5051713Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.5052204Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.5052602Z loc_info.update(kwargs)
2021-07-06T06:32:25.5052868Z
2021-07-06T06:32:25.5053089Z try:
2021-07-06T06:32:25.5053330Z > yield
2021-07-06T06:32:25.5053470Z
2021-07-06T06:32:25.5054139Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.5054670Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5054904Z
2021-07-06T06:32:25.5055187Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5055881Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.5056155Z
2021-07-06T06:32:25.5056417Z def lower_block(self, block):
2021-07-06T06:32:25.5056713Z """
2021-07-06T06:32:25.5056968Z Lower the given block.
2021-07-06T06:32:25.5057241Z """
2021-07-06T06:32:25.5057490Z self.pre_block(block)
2021-07-06T06:32:25.5057803Z for inst in block.body:
2021-07-06T06:32:25.5058103Z self.loc = inst.loc
2021-07-06T06:32:25.5058442Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.5059060Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.5061149Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.5061817Z > self.lower_inst(inst)
2021-07-06T06:32:25.5061972Z
2021-07-06T06:32:25.5062879Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.5063560Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5063782Z
2021-07-06T06:32:25.5064078Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5065487Z inst = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.5066064Z
2021-07-06T06:32:25.5066524Z def lower_inst(self, inst):
2021-07-06T06:32:25.5066901Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.5067315Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.5067820Z self.debug_print(str(inst))
2021-07-06T06:32:25.5068176Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.5068532Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5068894Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.5070061Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.5071486Z
2021-07-06T06:32:25.5071788Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.5072152Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.5072481Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.5072799Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.5073293Z
2021-07-06T06:32:25.5074183Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.5074848Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.5075349Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.5075797Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.5076082Z
2021-07-06T06:32:25.5076383Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.5077651Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.5078026Z self.builder.branch(target)
2021-07-06T06:32:25.5078296Z
2021-07-06T06:32:25.5078584Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.5078959Z if self.generator_info:
2021-07-06T06:32:25.5079962Z # StopIteration
2021-07-06T06:32:25.5080681Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.5081013Z return
2021-07-06T06:32:25.5081337Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5081683Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.5082042Z ty = self.fndesc.restype
2021-07-06T06:32:25.5083148Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.5083543Z # If returning an optional type
2021-07-06T06:32:25.5083979Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.5084496Z return
2021-07-06T06:32:25.5084782Z assert ty == oty, (
2021-07-06T06:32:25.5085468Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.5085932Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.5086332Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.5086641Z
2021-07-06T06:32:25.5086933Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.5087320Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5087656Z assert signature is not None
2021-07-06T06:32:25.5087957Z try:
2021-07-06T06:32:25.5088713Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.5089763Z except NotImplementedError:
2021-07-06T06:32:25.5090529Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.5090937Z inst.value, signature)
2021-07-06T06:32:25.5091283Z else:
2021-07-06T06:32:25.5091597Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5091972Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5092329Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.5092728Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.5093126Z signature.args[2])
2021-07-06T06:32:25.5094860Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.5095210Z
2021-07-06T06:32:25.5095496Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.5095867Z self.lower_print(inst)
2021-07-06T06:32:25.5096124Z
2021-07-06T06:32:25.5096434Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.5096968Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5097330Z assert signature is not None
2021-07-06T06:32:25.5097708Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.5098301Z signature)
2021-07-06T06:32:25.5098971Z
2021-07-06T06:32:25.5099925Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.5108199Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5108643Z assert signature is not None
2021-07-06T06:32:25.5109047Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.5110107Z
2021-07-06T06:32:25.5111586Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.5111985Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5112746Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.5113030Z
2021-07-06T06:32:25.5114500Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5114945Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.5115249Z
2021-07-06T06:32:25.5115535Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5116045Z assert signature is not None
2021-07-06T06:32:25.5116322Z
2021-07-06T06:32:25.5116791Z op = operator.delitem
2021-07-06T06:32:25.5117170Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.5117547Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.5117933Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.5118257Z )
2021-07-06T06:32:25.5118585Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.5118899Z
2021-07-06T06:32:25.5119823Z assert targetty == signature.args[0]
2021-07-06T06:32:25.5120586Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.5122078Z signature.args[1])
2021-07-06T06:32:25.5122471Z
2021-07-06T06:32:25.5122752Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.5123065Z
2021-07-06T06:32:25.5123336Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.5123676Z self.delvar(inst.value)
2021-07-06T06:32:25.5123925Z
2021-07-06T06:32:25.5124204Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.5124764Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5125121Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5125495Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5125778Z
2021-07-06T06:32:25.5126079Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5126639Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.5127001Z assert signature is not None
2021-07-06T06:32:25.5127347Z assert signature.args[0] == targetty
2021-07-06T06:32:25.5128891Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.5130684Z
2021-07-06T06:32:25.5130966Z # Convert argument to match
2021-07-06T06:32:25.5131708Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.5132123Z signature.args[1])
2021-07-06T06:32:25.5132427Z
2021-07-06T06:32:25.5132705Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.5133003Z
2021-07-06T06:32:25.5133293Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.5133657Z self.lower_static_raise(inst)
2021-07-06T06:32:25.5133917Z
2021-07-06T06:32:25.5134208Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.5134598Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.5134863Z
2021-07-06T06:32:25.5135101Z else:
2021-07-06T06:32:25.5135613Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.5136031Z if isinstance(inst, _class):
2021-07-06T06:32:25.5136367Z > func(self, inst)
2021-07-06T06:32:25.5136519Z
2021-07-06T06:32:25.5137299Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.5137814Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5138054Z
2021-07-06T06:32:25.5138339Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5140052Z parfor = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.5140654Z
2021-07-06T06:32:25.5141288Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.5141714Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.5142420Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.5145243Z The general approach is as follows:
2021-07-06T06:32:25.5146694Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.5147307Z in the context of the current function.
2021-07-06T06:32:25.5147715Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.5148313Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.5148760Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.5151171Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.5151839Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.5152409Z the final reduction values.
2021-07-06T06:32:25.5153598Z """
2021-07-06T06:32:25.5153960Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.5154287Z
2021-07-06T06:32:25.5154543Z ensure_parallel_support()
2021-07-06T06:32:25.5155419Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.5156030Z targetctx = lowerer.context
2021-07-06T06:32:25.5156749Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.5157234Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.5157624Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.5158042Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.5158463Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.5158841Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5160208Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.5160993Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.5161326Z varmap = lowerer.varmap
2021-07-06T06:32:25.5161597Z
2021-07-06T06:32:25.5161873Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5162209Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.5162534Z parfor.dump()
2021-07-06T06:32:25.5163519Z
2021-07-06T06:32:25.5163841Z loc = parfor.init_block.loc
2021-07-06T06:32:25.5164608Z scope = parfor.init_block.scope
2021-07-06T06:32:25.5164916Z
2021-07-06T06:32:25.5165192Z # produce instructions for init_block
2021-07-06T06:32:25.5165994Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5166419Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.5166861Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.5167248Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5167614Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.5167983Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.5168427Z
2021-07-06T06:32:25.5168722Z for racevar in parfor.races:
2021-07-06T06:32:25.5169074Z if racevar not in varmap:
2021-07-06T06:32:25.5170268Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.5170953Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.5171328Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.5171614Z
2021-07-06T06:32:25.5171851Z alias_map = {}
2021-07-06T06:32:25.5172138Z arg_aliases = {}
2021-07-06T06:32:25.5172518Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.5173012Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.5173415Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5173774Z print("alias_map", alias_map)
2021-07-06T06:32:25.5174112Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.5174411Z
2021-07-06T06:32:25.5174748Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.5175225Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.5175615Z assert parfor.params is not None
2021-07-06T06:32:25.5175881Z
2021-07-06T06:32:25.5176215Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.5176581Z parfor, parfor.params)
2021-07-06T06:32:25.5176987Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.5177443Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.5177850Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5178217Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.5178639Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.5178942Z
2021-07-06T06:32:25.5181006Z # init reduction array allocation here.
2021-07-06T06:32:25.5181402Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.5183110Z redarrs = {}
2021-07-06T06:32:25.5183517Z if nredvars > 0:
2021-07-06T06:32:25.5184024Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.5184407Z thread_count = get_thread_count()
2021-07-06T06:32:25.5184877Z scope = parfor.init_block.scope
2021-07-06T06:32:25.5185216Z loc = parfor.init_block.loc
2021-07-06T06:32:25.5185774Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.5186126Z
2021-07-06T06:32:25.5186400Z # For each reduction variable...
2021-07-06T06:32:25.5187132Z for i in range(nredvars):
2021-07-06T06:32:25.5187725Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.5188135Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.5188723Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.5189691Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.5190134Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5191537Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.5191972Z
2021-07-06T06:32:25.5192260Z # If this is reduction over an array,
2021-07-06T06:32:25.5193445Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.5193974Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.5194565Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.5194880Z else:
2021-07-06T06:32:25.5195836Z redarrdim = 1
2021-07-06T06:32:25.5196723Z
2021-07-06T06:32:25.5197095Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.5197658Z
2021-07-06T06:32:25.5198171Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.5198658Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.5200085Z fobj=np.empty,
2021-07-06T06:32:25.5202762Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.5203169Z args=(
2021-07-06T06:32:25.5204010Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.5204457Z types.DType(reddtype),
2021-07-06T06:32:25.5204787Z ),
2021-07-06T06:32:25.5205051Z )
2021-07-06T06:32:25.5205279Z
2021-07-06T06:32:25.5205702Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.5206172Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.5206651Z cval=thread_count,
2021-07-06T06:32:25.5206971Z typ=types.intp,
2021-07-06T06:32:25.5207606Z name='num_threads',
2021-07-06T06:32:25.5207911Z )
2021-07-06T06:32:25.5208160Z
2021-07-06T06:32:25.5208442Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.5208724Z
2021-07-06T06:32:25.5209038Z # If this is a reduction over an array...
2021-07-06T06:32:25.5210444Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.5210967Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.5211374Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.5211770Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.5212190Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.5213317Z name="redarr_shape",
2021-07-06T06:32:25.5213700Z )
2021-07-06T06:32:25.5213973Z
2021-07-06T06:32:25.5214513Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.5215007Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.5215381Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.5215777Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.5216183Z typ=types.intp,
2021-07-06T06:32:25.5216518Z name="redshapeonedim",
2021-07-06T06:32:25.5216843Z )
2021-07-06T06:32:25.5217158Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.5217457Z
2021-07-06T06:32:25.5217815Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.5218446Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.5220145Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.5221107Z )
2021-07-06T06:32:25.5221351Z
2021-07-06T06:32:25.5221656Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.5222234Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.5222541Z
2021-07-06T06:32:25.5222818Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.5223183Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.5223522Z )
2021-07-06T06:32:25.5223743Z
2021-07-06T06:32:25.5224760Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.5225250Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.5225558Z
2021-07-06T06:32:25.5225861Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.5226244Z if init_val is not None:
2021-07-06T06:32:25.5226856Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.5227695Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.5228374Z # First, create a variable for np.full.
2021-07-06T06:32:25.5228768Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.5229755Z fobj=np.full,
2021-07-06T06:32:25.5230450Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.5230833Z args=(
2021-07-06T06:32:25.5231196Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.5231588Z reddtype,
2021-07-06T06:32:25.5231956Z types.DType(reddtype),
2021-07-06T06:32:25.5232306Z ),
2021-07-06T06:32:25.5232582Z )
2021-07-06T06:32:25.5232821Z
2021-07-06T06:32:25.5233139Z # Then create a var with the identify value.
2021-07-06T06:32:25.5233534Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.5233907Z cval=init_val,
2021-07-06T06:32:25.5234224Z typ=reddtype,
2021-07-06T06:32:25.5234567Z name="init_val",
2021-07-06T06:32:25.5234864Z )
2021-07-06T06:32:25.5235132Z
2021-07-06T06:32:25.5235495Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.5235941Z full_call = pfbdr.call(
2021-07-06T06:32:25.5236323Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.5236677Z )
2021-07-06T06:32:25.5236928Z
2021-07-06T06:32:25.5237195Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.5237544Z rhs=full_call,
2021-07-06T06:32:25.5237865Z typ=redvar_typ,
2021-07-06T06:32:25.5238381Z name="redtoset",
2021-07-06T06:32:25.5239023Z )
2021-07-06T06:32:25.5240452Z else:
2021-07-06T06:32:25.5240814Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.5241498Z cval=init_val,
2021-07-06T06:32:25.5241874Z typ=reddtype,
2021-07-06T06:32:25.5242228Z name="redtoset",
2021-07-06T06:32:25.5242533Z )
2021-07-06T06:32:25.5243017Z else:
2021-07-06T06:32:25.5243309Z redtoset = redvar
2021-07-06T06:32:25.5243581Z
2021-07-06T06:32:25.5244054Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.5244527Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.5245027Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.5245338Z
2021-07-06T06:32:25.5245636Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.5246163Z cval=res_print_str,
2021-07-06T06:32:25.5246524Z typ=strconsttyp,
2021-07-06T06:32:25.5246863Z name="str_const",
2021-07-06T06:32:25.5247187Z )
2021-07-06T06:32:25.5247431Z
2021-07-06T06:32:25.5247753Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.5248161Z vararg=None, loc=loc)
2021-07-06T06:32:25.5248597Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.5249084Z typemap[lhs.name],
2021-07-06T06:32:25.5250105Z typemap[redvar.name])
2021-07-06T06:32:25.5251081Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.5251470Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.5251778Z
2021-07-06T06:32:25.5251984Z
2021-07-06T06:32:25.5252748Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.5253247Z for j in range(thread_count):
2021-07-06T06:32:25.5253812Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.5254197Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.5255034Z )
2021-07-06T06:32:25.5255585Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.5255932Z
2021-07-06T06:32:25.5256285Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.5256681Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.5257304Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.5257912Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.5258390Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.5258829Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.5259901Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.5261003Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.5261947Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.5262331Z try:
2021-07-06T06:32:25.5262596Z (func,
2021-07-06T06:32:25.5262851Z func_args,
2021-07-06T06:32:25.5263121Z func_sig,
2021-07-06T06:32:25.5263664Z redargstartdim,
2021-07-06T06:32:25.5263952Z func_arg_types,
2021-07-06T06:32:25.5264320Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.5264901Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.5265337Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.5265665Z finally:
2021-07-06T06:32:25.5266023Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.5266335Z
2021-07-06T06:32:25.5266607Z # get the shape signature
2021-07-06T06:32:25.5267207Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.5267557Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.5268176Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.5268584Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5269740Z print("func_args = ", func_args)
2021-07-06T06:32:25.5270426Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.5270829Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.5271217Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.5271952Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.5272363Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.5272720Z parfor.get_shape_classes,
2021-07-06T06:32:25.5273170Z num_inputs,
2021-07-06T06:32:25.5273440Z num_reductions,
2021-07-06T06:32:25.5273722Z func_args,
2021-07-06T06:32:25.5273986Z redargstartdim,
2021-07-06T06:32:25.5274265Z func_sig,
2021-07-06T06:32:25.5274525Z parfor.races,
2021-07-06T06:32:25.5274805Z typemap)
2021-07-06T06:32:25.5275095Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5275449Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.5275733Z
2021-07-06T06:32:25.5276048Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.5276655Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.5277032Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5277393Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.5277740Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.5278067Z call_parallel_gufunc(
2021-07-06T06:32:25.5278333Z lowerer,
2021-07-06T06:32:25.5278774Z func,
2021-07-06T06:32:25.5279037Z gu_signature,
2021-07-06T06:32:25.5281653Z func_sig,
2021-07-06T06:32:25.5281959Z func_args,
2021-07-06T06:32:25.5282226Z func_arg_types,
2021-07-06T06:32:25.5282517Z loop_ranges,
2021-07-06T06:32:25.5282785Z parfor_redvars,
2021-07-06T06:32:25.5283073Z parfor_reddict,
2021-07-06T06:32:25.5283348Z redarrs,
2021-07-06T06:32:25.5283631Z parfor.init_block,
2021-07-06T06:32:25.5283908Z index_var_typ,
2021-07-06T06:32:25.5284180Z parfor.races,
2021-07-06T06:32:25.5284476Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.5284627Z
2021-07-06T06:32:25.5285411Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.5285950Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5286171Z
2021-07-06T06:32:25.5287161Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5287900Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16a86e8e10>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.5289825Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.5290925Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.5291644Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.5292123Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.5292530Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.5293346Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.5293844Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.5294043Z
2021-07-06T06:32:25.5294378Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.5294895Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.5295357Z exp_name_to_tuple_var):
2021-07-06T06:32:25.5296488Z '''
2021-07-06T06:32:25.5297485Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.5298413Z '''
2021-07-06T06:32:25.5298714Z context = lowerer.context
2021-07-06T06:32:25.5300436Z builder = lowerer.builder
2021-07-06T06:32:25.5301476Z
2021-07-06T06:32:25.5301787Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.5302177Z get_thread_count,
2021-07-06T06:32:25.5302515Z _launch_threads)
2021-07-06T06:32:25.5302983Z
2021-07-06T06:32:25.5303259Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5303609Z print("make_parallel_loop")
2021-07-06T06:32:25.5303986Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.5304383Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.5304966Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.5305310Z print("expr_args", expr_args)
2021-07-06T06:32:25.5305818Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.5306175Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.5306644Z
2021-07-06T06:32:25.5306912Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.5307294Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.5307716Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.5308099Z sin, sout = gu_signature
2021-07-06T06:32:25.5308357Z
2021-07-06T06:32:25.5308686Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.5309074Z > _launch_threads()
2021-07-06T06:32:25.5310486Z
2021-07-06T06:32:25.5311389Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.5311949Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5312196Z
2021-07-06T06:32:25.5312465Z def _launch_threads():
2021-07-06T06:32:25.5312808Z if not _backend_init_process_lock:
2021-07-06T06:32:25.5313177Z _set_init_process_lock()
2021-07-06T06:32:25.5313439Z
2021-07-06T06:32:25.5313723Z with _backend_init_process_lock:
2021-07-06T06:32:25.5314112Z with _backend_init_thread_lock:
2021-07-06T06:32:25.5314460Z global _is_initialized
2021-07-06T06:32:25.5314955Z if _is_initialized:
2021-07-06T06:32:25.5315256Z return
2021-07-06T06:32:25.5315507Z
2021-07-06T06:32:25.5315802Z def select_known_backend(backend):
2021-07-06T06:32:25.5316146Z """
2021-07-06T06:32:25.5316488Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.5316848Z """
2021-07-06T06:32:25.5317120Z lib = None
2021-07-06T06:32:25.5317457Z if backend.startswith("tbb"):
2021-07-06T06:32:25.5317823Z try:
2021-07-06T06:32:25.5318178Z # check if TBB is present and compatible
2021-07-06T06:32:25.5318588Z _check_tbb_version_compatible()
2021-07-06T06:32:25.5322868Z # now try and load the backend
2021-07-06T06:32:25.5323323Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.5323724Z except ImportError:
2021-07-06T06:32:25.5324081Z pass
2021-07-06T06:32:25.5324802Z elif backend.startswith("omp"):
2021-07-06T06:32:25.5325288Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.5325737Z # that understands GNU OMP might be present
2021-07-06T06:32:25.5326104Z try:
2021-07-06T06:32:25.5326491Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.5327088Z except ImportError:
2021-07-06T06:32:25.5327473Z pass
2021-07-06T06:32:25.5327848Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.5328307Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.5328665Z else:
2021-07-06T06:32:25.5331370Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.5331939Z raise ValueError(msg % backend)
2021-07-06T06:32:25.5332303Z return lib
2021-07-06T06:32:25.5332556Z
2021-07-06T06:32:25.5332866Z def select_from_backends(backends):
2021-07-06T06:32:25.5333230Z """
2021-07-06T06:32:25.5333594Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.5333977Z """
2021-07-06T06:32:25.5335145Z lib = None
2021-07-06T06:32:25.5335895Z for backend in backends:
2021-07-06T06:32:25.5336779Z lib = select_known_backend(backend)
2021-07-06T06:32:25.5337433Z if lib is not None:
2021-07-06T06:32:25.5338258Z break
2021-07-06T06:32:25.5338568Z else:
2021-07-06T06:32:25.5340539Z backend = ''
2021-07-06T06:32:25.5340908Z return lib, backend
2021-07-06T06:32:25.5341189Z
2021-07-06T06:32:25.5341469Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.5342119Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.5342423Z
2021-07-06T06:32:25.5342722Z lib = None
2021-07-06T06:32:25.5343011Z err_helpers = dict()
2021-07-06T06:32:25.5343636Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.5344078Z "$ conda/pip install tbb")
2021-07-06T06:32:25.5345120Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.5346552Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.5346960Z requirements = []
2021-07-06T06:32:25.5347243Z
2021-07-06T06:32:25.5347544Z def raise_with_hint(required):
2021-07-06T06:32:25.5347970Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.5348598Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.5348973Z if len(required) == 0:
2021-07-06T06:32:25.5350738Z hint = ''
2021-07-06T06:32:25.5351119Z if len(required) == 1:
2021-07-06T06:32:25.5351498Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.5351891Z if len(required) > 1:
2021-07-06T06:32:25.5352496Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.5352971Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.5353575Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.5354258Z
2021-07-06T06:32:25.5354587Z if t in namedbackends:
2021-07-06T06:32:25.5355152Z # Try and load the specific named backend
2021-07-06T06:32:25.5355532Z lib = select_known_backend(t)
2021-07-06T06:32:25.5355862Z if not lib:
2021-07-06T06:32:25.5356254Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.5356665Z # loading, set requirements for hinting
2021-07-06T06:32:25.5357307Z if t == 'tbb':
2021-07-06T06:32:25.5357843Z requirements.append('TBB')
2021-07-06T06:32:25.5358417Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.5360603Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.5360995Z libname = t
2021-07-06T06:32:25.5362031Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.5362487Z # User wants a specific behaviour...
2021-07-06T06:32:25.5363018Z available = ['tbb']
2021-07-06T06:32:25.5363506Z requirements.append('TBB')
2021-07-06T06:32:25.5363870Z if t == "safe":
2021-07-06T06:32:25.5364261Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.5364638Z pass
2021-07-06T06:32:25.5364959Z elif t == "threadsafe":
2021-07-06T06:32:25.5365324Z if _IS_OSX:
2021-07-06T06:32:25.5365855Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.5366231Z # omp is threadsafe everywhere
2021-07-06T06:32:25.5366767Z available.append('omp')
2021-07-06T06:32:25.5367124Z elif t == "forksafe":
2021-07-06T06:32:25.5367552Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.5368194Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.5368605Z # this to workqueue
2021-07-06T06:32:25.5368944Z if not _IS_LINUX:
2021-07-06T06:32:25.5370997Z available.append('omp')
2021-07-06T06:32:25.5371369Z if _IS_OSX:
2021-07-06T06:32:25.5371921Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.5372305Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.5372853Z available.append('workqueue')
2021-07-06T06:32:25.5373211Z else: # unreachable
2021-07-06T06:32:25.5373591Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.5374005Z raise ValueError(msg % t)
2021-07-06T06:32:25.5374344Z # select amongst available
2021-07-06T06:32:25.5374729Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.5375255Z elif t == 'default':
2021-07-06T06:32:25.5376573Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.5376934Z # workqueue
2021-07-06T06:32:25.5377285Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.5377636Z if not lib:
2021-07-06T06:32:25.5378412Z # set requirements for hinting
2021-07-06T06:32:25.5379049Z requirements.append('TBB')
2021-07-06T06:32:25.5381661Z if _IS_OSX:
2021-07-06T06:32:25.5382352Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.5382725Z else:
2021-07-06T06:32:25.5383335Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.5383760Z raise ValueError(msg % t)
2021-07-06T06:32:25.5384057Z
2021-07-06T06:32:25.5384337Z # No lib found, raise and hint
2021-07-06T06:32:25.5384838Z if not lib:
2021-07-06T06:32:25.5385170Z > raise_with_hint(requirements)
2021-07-06T06:32:25.5385349Z
2021-07-06T06:32:25.5386361Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.5388077Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5388365Z
2021-07-06T06:32:25.5388872Z required = ['TBB']
2021-07-06T06:32:25.5389006Z
2021-07-06T06:32:25.5390978Z def raise_with_hint(required):
2021-07-06T06:32:25.5391356Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.5391882Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.5392389Z if len(required) == 0:
2021-07-06T06:32:25.5393108Z hint = ''
2021-07-06T06:32:25.5393439Z if len(required) == 1:
2021-07-06T06:32:25.5394296Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.5395194Z if len(required) > 1:
2021-07-06T06:32:25.5396209Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.5396659Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.5397927Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.5398648Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.5400673Z E HINT:
2021-07-06T06:32:25.5401285Z E Intel TBB is required, try:
2021-07-06T06:32:25.5402028Z E $ conda/pip install tbb
2021-07-06T06:32:25.5402204Z
2021-07-06T06:32:25.5402869Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.5403203Z
2021-07-06T06:32:25.5403760Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.5404192Z
2021-07-06T06:32:25.5404487Z @pytest.fixture(scope="module")
2021-07-06T06:32:25.5404803Z def pbmc_scatterplots():
2021-07-06T06:32:25.5405152Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.5405494Z pbmc.layers["sparse"] = pbmc.raw.X / 2
2021-07-06T06:32:25.5405862Z pbmc.layers["test"] = pbmc.X.copy() + 100
2021-07-06T06:32:25.5406248Z pbmc.var["numbers"] = [str(x) for x in range(pbmc.shape[1])]
2021-07-06T06:32:25.5407031Z > sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.5407197Z
2021-07-06T06:32:25.5408525Z scanpy/tests/test_plotting.py:949:
2021-07-06T06:32:25.5409035Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5411099Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.5412009Z random_state=random_state,
2021-07-06T06:32:25.5412687Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.5413088Z self.n_neighbors,
2021-07-06T06:32:25.5413661Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.5414074Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.5414804Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.5416070Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.5416962Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.5417422Z raise e
2021-07-06T06:32:25.5418279Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.5418782Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.5420870Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.5421404Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.5422152Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.5422645Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.5423732Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.5424391Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.5425327Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.5425821Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.5426764Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.5427252Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.5427996Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.5428476Z return self._compile_bytecode()
2021-07-06T06:32:25.5430529Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.5431037Z return self._compile_core()
2021-07-06T06:32:25.5432157Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.5432642Z raise e
2021-07-06T06:32:25.5433408Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.5433870Z pm.run(self.state)
2021-07-06T06:32:25.5434539Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.5435182Z raise patched_exception
2021-07-06T06:32:25.5435887Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.5436382Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.5437101Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.5437598Z return func(*args, **kwargs)
2021-07-06T06:32:25.5438285Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.5438801Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.5439584Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.5440190Z mangled = func(compiler_state)
2021-07-06T06:32:25.5440872Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.5441359Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.5442039Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.5442489Z lower.lower()
2021-07-06T06:32:25.5443120Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.5443928Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.5444640Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.5445152Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.5445874Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.5446348Z self.lower_block(block)
2021-07-06T06:32:25.5447016Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.5447475Z self.lower_inst(inst)
2021-07-06T06:32:25.5448835Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.5449345Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.5449728Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5449953Z
2021-07-06T06:32:25.5450454Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.5452209Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.5454068Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.5454993Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.5456174Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.5456838Z tb = None
2021-07-06T06:32:25.5456964Z
2021-07-06T06:32:25.5457197Z @contextlib.contextmanager
2021-07-06T06:32:25.5457523Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.5457842Z """
2021-07-06T06:32:25.5458157Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.5458601Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.5459128Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.5459558Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.5459888Z constructor.
2021-07-06T06:32:25.5460125Z
2021-07-06T06:32:25.5460435Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.5460871Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.5461287Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.5461618Z """
2021-07-06T06:32:25.5462097Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.5462380Z
2021-07-06T06:32:25.5462793Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.5463191Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.5463591Z loc_info.update(kwargs)
2021-07-06T06:32:25.5463832Z
2021-07-06T06:32:25.5464067Z try:
2021-07-06T06:32:25.5464300Z yield
2021-07-06T06:32:25.5464747Z except NumbaError as e:
2021-07-06T06:32:25.5465093Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.5465391Z raise
2021-07-06T06:32:25.5465673Z except Exception as e:
2021-07-06T06:32:25.5466025Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.5466458Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.5466828Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.5467760Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.5468658Z E No threading layer could be loaded.
2021-07-06T06:32:25.5469208Z E HINT:
2021-07-06T06:32:25.5469936Z E Intel TBB is required, try:
2021-07-06T06:32:25.5470873Z E $ conda/pip install tbb
2021-07-06T06:32:25.5472070Z E 
2021-07-06T06:32:25.5472874Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.5473619Z E def compute_membership_strengths(
2021-07-06T06:32:25.5474151Z E <source elided>
2021-07-06T06:32:25.5474633Z E 
2021-07-06T06:32:25.5475193Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.5475745Z E ^
2021-07-06T06:32:25.5476503Z E 
2021-07-06T06:32:25.5478706Z E During: lowering "id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.5479669Z
2021-07-06T06:32:25.5480382Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.5481154Z ____________ ERROR at setup of test_scatterplots[3dprojection-fn2] _____________
2021-07-06T06:32:25.5481435Z
2021-07-06T06:32:25.5481879Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.5483997Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.5485360Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.5486668Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.5487863Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.5488568Z tb = None
2021-07-06T06:32:25.5488680Z
2021-07-06T06:32:25.5488917Z @contextlib.contextmanager
2021-07-06T06:32:25.5489273Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.5489583Z """
2021-07-06T06:32:25.5490132Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.5490584Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.5491059Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.5491504Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.5491881Z constructor.
2021-07-06T06:32:25.5492118Z
2021-07-06T06:32:25.5492464Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.5492921Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.5493520Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.5493867Z """
2021-07-06T06:32:25.5494343Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.5494653Z
2021-07-06T06:32:25.5495058Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.5495481Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.5495878Z loc_info.update(kwargs)
2021-07-06T06:32:25.5496853Z
2021-07-06T06:32:25.5497111Z try:
2021-07-06T06:32:25.5505375Z > yield
2021-07-06T06:32:25.5505532Z
2021-07-06T06:32:25.5506311Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.5506868Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5507100Z
2021-07-06T06:32:25.5507394Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5508827Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.5509510Z
2021-07-06T06:32:25.5509850Z def lower_block(self, block):
2021-07-06T06:32:25.5510164Z """
2021-07-06T06:32:25.5510427Z Lower the given block.
2021-07-06T06:32:25.5510708Z """
2021-07-06T06:32:25.5510968Z self.pre_block(block)
2021-07-06T06:32:25.5511641Z for inst in block.body:
2021-07-06T06:32:25.5512203Z self.loc = inst.loc
2021-07-06T06:32:25.5512553Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.5513313Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.5513803Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.5514236Z > self.lower_inst(inst)
2021-07-06T06:32:25.5514396Z
2021-07-06T06:32:25.5515646Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.5516238Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5516469Z
2021-07-06T06:32:25.5516777Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5517977Z inst = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.5518575Z
2021-07-06T06:32:25.5519005Z def lower_inst(self, inst):
2021-07-06T06:32:25.5519704Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.5520124Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.5520475Z self.debug_print(str(inst))
2021-07-06T06:32:25.5520830Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.5521185Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5521546Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.5521894Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.5522189Z
2021-07-06T06:32:25.5522480Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.5522839Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.5523194Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.5523524Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.5523821Z
2021-07-06T06:32:25.5524100Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.5524543Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.5525031Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.5525479Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.5525758Z
2021-07-06T06:32:25.5526221Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.5526773Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.5527262Z self.builder.branch(target)
2021-07-06T06:32:25.5527718Z
2021-07-06T06:32:25.5528005Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.5528378Z if self.generator_info:
2021-07-06T06:32:25.5528859Z # StopIteration
2021-07-06T06:32:25.5529365Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.5529694Z return
2021-07-06T06:32:25.5530023Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5530740Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.5531157Z ty = self.fndesc.restype
2021-07-06T06:32:25.5531536Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.5531907Z # If returning an optional type
2021-07-06T06:32:25.5532327Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.5532690Z return
2021-07-06T06:32:25.5532988Z assert ty == oty, (
2021-07-06T06:32:25.5533663Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.5534142Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.5534558Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.5535035Z
2021-07-06T06:32:25.5535319Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.5536015Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5536350Z assert signature is not None
2021-07-06T06:32:25.5536633Z try:
2021-07-06T06:32:25.5537223Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.5538176Z except NotImplementedError:
2021-07-06T06:32:25.5538588Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.5539000Z inst.value, signature)
2021-07-06T06:32:25.5539356Z else:
2021-07-06T06:32:25.5539678Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5540068Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5540438Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.5540854Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.5541265Z signature.args[2])
2021-07-06T06:32:25.5541675Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.5542006Z
2021-07-06T06:32:25.5542396Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.5542754Z self.lower_print(inst)
2021-07-06T06:32:25.5543012Z
2021-07-06T06:32:25.5543318Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.5543689Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5544051Z assert signature is not None
2021-07-06T06:32:25.5544430Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.5545488Z signature)
2021-07-06T06:32:25.5546116Z
2021-07-06T06:32:25.5546410Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.5546799Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5547143Z assert signature is not None
2021-07-06T06:32:25.5547564Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.5547897Z
2021-07-06T06:32:25.5548203Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.5548577Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5548950Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.5549233Z
2021-07-06T06:32:25.5549517Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5549894Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.5550178Z
2021-07-06T06:32:25.5550478Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5551065Z assert signature is not None
2021-07-06T06:32:25.5551520Z
2021-07-06T06:32:25.5551773Z op = operator.delitem
2021-07-06T06:32:25.5552148Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.5552522Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.5552908Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.5553278Z )
2021-07-06T06:32:25.5553590Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.5553914Z
2021-07-06T06:32:25.5554192Z assert targetty == signature.args[0]
2021-07-06T06:32:25.5554589Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.5554984Z signature.args[1])
2021-07-06T06:32:25.5555296Z
2021-07-06T06:32:25.5555584Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.5555889Z
2021-07-06T06:32:25.5556170Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.5556502Z self.delvar(inst.value)
2021-07-06T06:32:25.5556778Z
2021-07-06T06:32:25.5557066Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.5557964Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5558297Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5558975Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5559486Z
2021-07-06T06:32:25.5559766Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5560375Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.5560902Z assert signature is not None
2021-07-06T06:32:25.5561391Z assert signature.args[0] == targetty
2021-07-06T06:32:25.5561755Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.5562270Z
2021-07-06T06:32:25.5562536Z # Convert argument to match
2021-07-06T06:32:25.5562918Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.5563516Z signature.args[1])
2021-07-06T06:32:25.5563812Z
2021-07-06T06:32:25.5564090Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.5564565Z
2021-07-06T06:32:25.5565009Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.5565360Z self.lower_static_raise(inst)
2021-07-06T06:32:25.5565885Z
2021-07-06T06:32:25.5566346Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.5567000Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.5567277Z
2021-07-06T06:32:25.5567971Z else:
2021-07-06T06:32:25.5568320Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.5568749Z if isinstance(inst, _class):
2021-07-06T06:32:25.5569098Z > func(self, inst)
2021-07-06T06:32:25.5569254Z
2021-07-06T06:32:25.5570015Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.5570548Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5570777Z
2021-07-06T06:32:25.5571090Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5572494Z parfor = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.5573079Z
2021-07-06T06:32:25.5573371Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.5573775Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.5574335Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.5574713Z The general approach is as follows:
2021-07-06T06:32:25.5575636Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.5576008Z in the context of the current function.
2021-07-06T06:32:25.5576393Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.5576799Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.5577580Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.5578007Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.5578458Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.5578832Z the final reduction values.
2021-07-06T06:32:25.5579124Z """
2021-07-06T06:32:25.5579438Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.5579755Z
2021-07-06T06:32:25.5580012Z ensure_parallel_support()
2021-07-06T06:32:25.5580743Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.5581136Z targetctx = lowerer.context
2021-07-06T06:32:25.5581810Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.5582291Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.5582683Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.5583099Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.5583695Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.5584080Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5584599Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.5585013Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.5585326Z varmap = lowerer.varmap
2021-07-06T06:32:25.5585584Z
2021-07-06T06:32:25.5585874Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5586212Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.5586536Z parfor.dump()
2021-07-06T06:32:25.5586783Z
2021-07-06T06:32:25.5587056Z loc = parfor.init_block.loc
2021-07-06T06:32:25.5587375Z scope = parfor.init_block.scope
2021-07-06T06:32:25.5587655Z
2021-07-06T06:32:25.5587930Z # produce instructions for init_block
2021-07-06T06:32:25.5588271Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5588697Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.5589124Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.5589767Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5590123Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.5590476Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.5590732Z
2021-07-06T06:32:25.5591015Z for racevar in parfor.races:
2021-07-06T06:32:25.5591352Z if racevar not in varmap:
2021-07-06T06:32:25.5591693Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.5592019Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.5592362Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.5592653Z
2021-07-06T06:32:25.5592880Z alias_map = {}
2021-07-06T06:32:25.5593157Z arg_aliases = {}
2021-07-06T06:32:25.5593522Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.5594004Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.5594392Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5594916Z print("alias_map", alias_map)
2021-07-06T06:32:25.5595253Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.5595542Z
2021-07-06T06:32:25.5595880Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.5596344Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.5596749Z assert parfor.params is not None
2021-07-06T06:32:25.5597013Z
2021-07-06T06:32:25.5597342Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.5597710Z parfor, parfor.params)
2021-07-06T06:32:25.5598113Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.5598574Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.5599878Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5601048Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.5601528Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.5601834Z
2021-07-06T06:32:25.5602113Z # init reduction array allocation here.
2021-07-06T06:32:25.5602463Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.5602752Z redarrs = {}
2021-07-06T06:32:25.5603050Z if nredvars > 0:
2021-07-06T06:32:25.5603406Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.5603804Z thread_count = get_thread_count()
2021-07-06T06:32:25.5604142Z scope = parfor.init_block.scope
2021-07-06T06:32:25.5604486Z loc = parfor.init_block.loc
2021-07-06T06:32:25.5605392Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.5606145Z
2021-07-06T06:32:25.5606401Z # For each reduction variable...
2021-07-06T06:32:25.5606911Z for i in range(nredvars):
2021-07-06T06:32:25.5607642Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.5609498Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.5610147Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.5610528Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.5610905Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5611739Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.5612122Z
2021-07-06T06:32:25.5612576Z # If this is reduction over an array,
2021-07-06T06:32:25.5613856Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.5614340Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.5614784Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.5615109Z else:
2021-07-06T06:32:25.5615553Z redarrdim = 1
2021-07-06T06:32:25.5615830Z
2021-07-06T06:32:25.5616180Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.5616550Z
2021-07-06T06:32:25.5616853Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.5617263Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.5617612Z fobj=np.empty,
2021-07-06T06:32:25.5617964Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.5619313Z args=(
2021-07-06T06:32:25.5619833Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.5620203Z types.DType(reddtype),
2021-07-06T06:32:25.5620825Z ),
2021-07-06T06:32:25.5621214Z )
2021-07-06T06:32:25.5621427Z
2021-07-06T06:32:25.5621780Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.5622209Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.5622556Z cval=thread_count,
2021-07-06T06:32:25.5622847Z typ=types.intp,
2021-07-06T06:32:25.5623418Z name='num_threads',
2021-07-06T06:32:25.5623701Z )
2021-07-06T06:32:25.5623915Z
2021-07-06T06:32:25.5624191Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.5624454Z
2021-07-06T06:32:25.5624885Z # If this is a reduction over an array...
2021-07-06T06:32:25.5625280Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.5625914Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.5626306Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.5626696Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.5627432Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.5627825Z name="redarr_shape",
2021-07-06T06:32:25.5628268Z )
2021-07-06T06:32:25.5629880Z
2021-07-06T06:32:25.5630735Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.5631249Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.5632330Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.5632761Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.5633190Z typ=types.intp,
2021-07-06T06:32:25.5633537Z name="redshapeonedim",
2021-07-06T06:32:25.5634080Z )
2021-07-06T06:32:25.5634545Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.5634837Z
2021-07-06T06:32:25.5635182Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.5635629Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.5637006Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.5637344Z )
2021-07-06T06:32:25.5637692Z
2021-07-06T06:32:25.5637973Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.5638537Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.5639015Z
2021-07-06T06:32:25.5639455Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.5639969Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.5640299Z )
2021-07-06T06:32:25.5640513Z
2021-07-06T06:32:25.5641095Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.5641564Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.5641977Z
2021-07-06T06:32:25.5642459Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.5643178Z if init_val is not None:
2021-07-06T06:32:25.5643817Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.5644252Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.5644665Z # First, create a variable for np.full.
2021-07-06T06:32:25.5645223Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.5645598Z fobj=np.full,
2021-07-06T06:32:25.5645944Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.5646472Z args=(
2021-07-06T06:32:25.5646852Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.5647258Z reddtype,
2021-07-06T06:32:25.5647776Z types.DType(reddtype),
2021-07-06T06:32:25.5648097Z ),
2021-07-06T06:32:25.5648387Z )
2021-07-06T06:32:25.5648858Z
2021-07-06T06:32:25.5649377Z # Then create a var with the identify value.
2021-07-06T06:32:25.5650171Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.5650543Z cval=init_val,
2021-07-06T06:32:25.5650862Z typ=reddtype,
2021-07-06T06:32:25.5651198Z name="init_val",
2021-07-06T06:32:25.5651499Z )
2021-07-06T06:32:25.5651733Z
2021-07-06T06:32:25.5652109Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.5652725Z full_call = pfbdr.call(
2021-07-06T06:32:25.5653141Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.5653509Z )
2021-07-06T06:32:25.5653768Z
2021-07-06T06:32:25.5654193Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.5654721Z rhs=full_call,
2021-07-06T06:32:25.5655056Z typ=redvar_typ,
2021-07-06T06:32:25.5655408Z name="redtoset",
2021-07-06T06:32:25.5655717Z )
2021-07-06T06:32:25.5656005Z else:
2021-07-06T06:32:25.5656369Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.5656734Z cval=init_val,
2021-07-06T06:32:25.5657079Z typ=reddtype,
2021-07-06T06:32:25.5657412Z name="redtoset",
2021-07-06T06:32:25.5657735Z )
2021-07-06T06:32:25.5658109Z else:
2021-07-06T06:32:25.5658860Z redtoset = redvar
2021-07-06T06:32:25.5659142Z
2021-07-06T06:32:25.5659469Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.5660365Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.5660876Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.5661582Z
2021-07-06T06:32:25.5661906Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.5662628Z cval=res_print_str,
2021-07-06T06:32:25.5663046Z typ=strconsttyp,
2021-07-06T06:32:25.5663411Z name="str_const",
2021-07-06T06:32:25.5663721Z )
2021-07-06T06:32:25.5663978Z
2021-07-06T06:32:25.5664281Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.5664842Z vararg=None, loc=loc)
2021-07-06T06:32:25.5665458Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.5666060Z typemap[lhs.name],
2021-07-06T06:32:25.5666529Z typemap[redvar.name])
2021-07-06T06:32:25.5666945Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.5667331Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.5667610Z
2021-07-06T06:32:25.5667825Z
2021-07-06T06:32:25.5668531Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.5669030Z for j in range(thread_count):
2021-07-06T06:32:25.5669407Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.5669806Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.5670138Z )
2021-07-06T06:32:25.5670499Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.5670825Z
2021-07-06T06:32:25.5671145Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.5671538Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.5672025Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.5672628Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.5673072Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.5673510Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.5673896Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.5674285Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.5674672Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.5675006Z try:
2021-07-06T06:32:25.5675421Z (func,
2021-07-06T06:32:25.5675701Z func_args,
2021-07-06T06:32:25.5675975Z func_sig,
2021-07-06T06:32:25.5676250Z redargstartdim,
2021-07-06T06:32:25.5676556Z func_arg_types,
2021-07-06T06:32:25.5676908Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.5677354Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.5678170Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.5678516Z finally:
2021-07-06T06:32:25.5678855Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.5679688Z
2021-07-06T06:32:25.5679935Z # get the shape signature
2021-07-06T06:32:25.5680413Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.5680767Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.5681474Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.5681893Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5682228Z print("func_args = ", func_args)
2021-07-06T06:32:25.5682573Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.5682926Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.5683310Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.5683864Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.5684926Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.5685257Z parfor.get_shape_classes,
2021-07-06T06:32:25.5685703Z num_inputs,
2021-07-06T06:32:25.5685992Z num_reductions,
2021-07-06T06:32:25.5686260Z func_args,
2021-07-06T06:32:25.5686721Z redargstartdim,
2021-07-06T06:32:25.5686996Z func_sig,
2021-07-06T06:32:25.5687283Z parfor.races,
2021-07-06T06:32:25.5687722Z typemap)
2021-07-06T06:32:25.5688273Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5688989Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.5690298Z
2021-07-06T06:32:25.5690660Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.5691106Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.5691517Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5691870Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.5692247Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.5692568Z call_parallel_gufunc(
2021-07-06T06:32:25.5693011Z lowerer,
2021-07-06T06:32:25.5693586Z func,
2021-07-06T06:32:25.5693848Z gu_signature,
2021-07-06T06:32:25.5694742Z func_sig,
2021-07-06T06:32:25.5695006Z func_args,
2021-07-06T06:32:25.5695298Z func_arg_types,
2021-07-06T06:32:25.5695557Z loop_ranges,
2021-07-06T06:32:25.5696072Z parfor_redvars,
2021-07-06T06:32:25.5696344Z parfor_reddict,
2021-07-06T06:32:25.5696630Z redarrs,
2021-07-06T06:32:25.5696897Z parfor.init_block,
2021-07-06T06:32:25.5697187Z index_var_typ,
2021-07-06T06:32:25.5697453Z parfor.races,
2021-07-06T06:32:25.5697733Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.5697898Z
2021-07-06T06:32:25.5698645Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.5699198Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5699422Z
2021-07-06T06:32:25.5699706Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5702088Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16a86e8e10>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.5703085Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.5704289Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.5705215Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.5706050Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.5706842Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.5707677Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.5708536Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.5708779Z
2021-07-06T06:32:25.5709192Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.5709712Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.5710783Z exp_name_to_tuple_var):
2021-07-06T06:32:25.5711356Z '''
2021-07-06T06:32:25.5711719Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.5712184Z '''
2021-07-06T06:32:25.5712463Z context = lowerer.context
2021-07-06T06:32:25.5712790Z builder = lowerer.builder
2021-07-06T06:32:25.5713046Z
2021-07-06T06:32:25.5713373Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.5713755Z get_thread_count,
2021-07-06T06:32:25.5714123Z _launch_threads)
2021-07-06T06:32:25.5714404Z
2021-07-06T06:32:25.5714696Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5715031Z print("make_parallel_loop")
2021-07-06T06:32:25.5715632Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.5716020Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.5716366Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.5716821Z print("expr_args", expr_args)
2021-07-06T06:32:25.5717154Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.5717513Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.5718130Z
2021-07-06T06:32:25.5718402Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.5718932Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.5719371Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.5719738Z sin, sout = gu_signature
2021-07-06T06:32:25.5720010Z
2021-07-06T06:32:25.5720342Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.5720711Z > _launch_threads()
2021-07-06T06:32:25.5720868Z
2021-07-06T06:32:25.5721696Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.5722433Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5722822Z
2021-07-06T06:32:25.5723241Z def _launch_threads():
2021-07-06T06:32:25.5723599Z if not _backend_init_process_lock:
2021-07-06T06:32:25.5723944Z _set_init_process_lock()
2021-07-06T06:32:25.5724220Z
2021-07-06T06:32:25.5724662Z with _backend_init_process_lock:
2021-07-06T06:32:25.5725018Z with _backend_init_thread_lock:
2021-07-06T06:32:25.5725374Z global _is_initialized
2021-07-06T06:32:25.5725693Z if _is_initialized:
2021-07-06T06:32:25.5726010Z return
2021-07-06T06:32:25.5726244Z
2021-07-06T06:32:25.5726556Z def select_known_backend(backend):
2021-07-06T06:32:25.5726884Z """
2021-07-06T06:32:25.5727244Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.5727594Z """
2021-07-06T06:32:25.5727864Z lib = None
2021-07-06T06:32:25.5728221Z if backend.startswith("tbb"):
2021-07-06T06:32:25.5728566Z try:
2021-07-06T06:32:25.5728938Z # check if TBB is present and compatible
2021-07-06T06:32:25.5729328Z _check_tbb_version_compatible()
2021-07-06T06:32:25.5729718Z # now try and load the backend
2021-07-06T06:32:25.5730291Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.5730705Z except ImportError:
2021-07-06T06:32:25.5731047Z pass
2021-07-06T06:32:25.5731418Z elif backend.startswith("omp"):
2021-07-06T06:32:25.5731861Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.5732439Z # that understands GNU OMP might be present
2021-07-06T06:32:25.5732803Z try:
2021-07-06T06:32:25.5733169Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.5733594Z except ImportError:
2021-07-06T06:32:25.5734101Z pass
2021-07-06T06:32:25.5734474Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.5735204Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.5735749Z else:
2021-07-06T06:32:25.5736164Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.5736631Z raise ValueError(msg % backend)
2021-07-06T06:32:25.5736966Z return lib
2021-07-06T06:32:25.5737232Z
2021-07-06T06:32:25.5737544Z def select_from_backends(backends):
2021-07-06T06:32:25.5738630Z """
2021-07-06T06:32:25.5739048Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.5739416Z """
2021-07-06T06:32:25.5739867Z lib = None
2021-07-06T06:32:25.5740206Z for backend in backends:
2021-07-06T06:32:25.5740610Z lib = select_known_backend(backend)
2021-07-06T06:32:25.5740993Z if lib is not None:
2021-07-06T06:32:25.5741350Z break
2021-07-06T06:32:25.5741654Z else:
2021-07-06T06:32:25.5742261Z backend = ''
2021-07-06T06:32:25.5742599Z return lib, backend
2021-07-06T06:32:25.5742865Z
2021-07-06T06:32:25.5743872Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.5744709Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.5745844Z
2021-07-06T06:32:25.5746110Z lib = None
2021-07-06T06:32:25.5746445Z err_helpers = dict()
2021-07-06T06:32:25.5748100Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.5748998Z "$ conda/pip install tbb")
2021-07-06T06:32:25.5749766Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.5750485Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.5751477Z requirements = []
2021-07-06T06:32:25.5751814Z
2021-07-06T06:32:25.5752286Z def raise_with_hint(required):
2021-07-06T06:32:25.5753351Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.5753776Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.5754135Z if len(required) == 0:
2021-07-06T06:32:25.5754736Z hint = ''
2021-07-06T06:32:25.5755082Z if len(required) == 1:
2021-07-06T06:32:25.5755493Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.5755870Z if len(required) > 1:
2021-07-06T06:32:25.5756493Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.5757129Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.5757544Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.5757848Z
2021-07-06T06:32:25.5758130Z if t in namedbackends:
2021-07-06T06:32:25.5758522Z # Try and load the specific named backend
2021-07-06T06:32:25.5758898Z lib = select_known_backend(t)
2021-07-06T06:32:25.5759255Z if not lib:
2021-07-06T06:32:25.5759645Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.5760088Z # loading, set requirements for hinting
2021-07-06T06:32:25.5760638Z if t == 'tbb':
2021-07-06T06:32:25.5761398Z requirements.append('TBB')
2021-07-06T06:32:25.5761976Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.5762567Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.5763110Z libname = t
2021-07-06T06:32:25.5763646Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.5764080Z # User wants a specific behaviour...
2021-07-06T06:32:25.5764739Z available = ['tbb']
2021-07-06T06:32:25.5765419Z requirements.append('TBB')
2021-07-06T06:32:25.5766177Z if t == "safe":
2021-07-06T06:32:25.5766585Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.5766946Z pass
2021-07-06T06:32:25.5767284Z elif t == "threadsafe":
2021-07-06T06:32:25.5767633Z if _IS_OSX:
2021-07-06T06:32:25.5768185Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.5768565Z # omp is threadsafe everywhere
2021-07-06T06:32:25.5769214Z available.append('omp')
2021-07-06T06:32:25.5769594Z elif t == "forksafe":
2021-07-06T06:32:25.5770000Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.5770468Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.5770856Z # this to workqueue
2021-07-06T06:32:25.5771211Z if not _IS_LINUX:
2021-07-06T06:32:25.5771738Z available.append('omp')
2021-07-06T06:32:25.5772110Z if _IS_OSX:
2021-07-06T06:32:25.5772635Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.5773060Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.5773598Z available.append('workqueue')
2021-07-06T06:32:25.5773973Z else: # unreachable
2021-07-06T06:32:25.5774355Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.5774746Z raise ValueError(msg % t)
2021-07-06T06:32:25.5775103Z # select amongst available
2021-07-06T06:32:25.5775465Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.5776005Z elif t == 'default':
2021-07-06T06:32:25.5776395Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.5776768Z # workqueue
2021-07-06T06:32:25.5777115Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.5777492Z if not lib:
2021-07-06T06:32:25.5777829Z # set requirements for hinting
2021-07-06T06:32:25.5778543Z requirements.append('TBB')
2021-07-06T06:32:25.5778915Z if _IS_OSX:
2021-07-06T06:32:25.5779459Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.5779831Z else:
2021-07-06T06:32:25.5780409Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.5780846Z raise ValueError(msg % t)
2021-07-06T06:32:25.5781891Z
2021-07-06T06:32:25.5782210Z # No lib found, raise and hint
2021-07-06T06:32:25.5782541Z if not lib:
2021-07-06T06:32:25.5783055Z > raise_with_hint(requirements)
2021-07-06T06:32:25.5783230Z
2021-07-06T06:32:25.5783937Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.5784606Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5784833Z
2021-07-06T06:32:25.5785225Z required = ['TBB']
2021-07-06T06:32:25.5785529Z
2021-07-06T06:32:25.5785799Z def raise_with_hint(required):
2021-07-06T06:32:25.5786166Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.5786513Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.5786820Z if len(required) == 0:
2021-07-06T06:32:25.5787443Z hint = ''
2021-07-06T06:32:25.5787727Z if len(required) == 1:
2021-07-06T06:32:25.5788068Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.5788390Z if len(required) > 1:
2021-07-06T06:32:25.5788930Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.5789334Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.5789693Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.5790230Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.5790740Z E HINT:
2021-07-06T06:32:25.5791228Z E Intel TBB is required, try:
2021-07-06T06:32:25.5791733Z E $ conda/pip install tbb
2021-07-06T06:32:25.5792101Z
2021-07-06T06:32:25.5792912Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.5793328Z
2021-07-06T06:32:25.5793934Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.5794201Z
2021-07-06T06:32:25.5794458Z @pytest.fixture(scope="module")
2021-07-06T06:32:25.5794789Z def pbmc_scatterplots():
2021-07-06T06:32:25.5795119Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.5795477Z pbmc.layers["sparse"] = pbmc.raw.X / 2
2021-07-06T06:32:25.5795826Z pbmc.layers["test"] = pbmc.X.copy() + 100
2021-07-06T06:32:25.5796228Z pbmc.var["numbers"] = [str(x) for x in range(pbmc.shape[1])]
2021-07-06T06:32:25.5796585Z > sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.5796731Z
2021-07-06T06:32:25.5797214Z scanpy/tests/test_plotting.py:949:
2021-07-06T06:32:25.5797797Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5798414Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.5798768Z random_state=random_state,
2021-07-06T06:32:25.5799315Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.5799664Z self.n_neighbors,
2021-07-06T06:32:25.5800402Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.5800833Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.5802527Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.5803080Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.5803843Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.5804331Z raise e
2021-07-06T06:32:25.5805018Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.5805554Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.5806267Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.5806786Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.5807506Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.5808035Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.5808788Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.5809315Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.5810051Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.5810718Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.5811469Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.5811977Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.5812689Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.5813188Z return self._compile_bytecode()
2021-07-06T06:32:25.5813903Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.5814472Z return self._compile_core()
2021-07-06T06:32:25.5815171Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.5815632Z raise e
2021-07-06T06:32:25.5816298Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.5816870Z pm.run(self.state)
2021-07-06T06:32:25.5817583Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.5818050Z raise patched_exception
2021-07-06T06:32:25.5818928Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.5819582Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.5820570Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.5821718Z return func(*args, **kwargs)
2021-07-06T06:32:25.5823166Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.5823759Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.5825100Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.5825607Z mangled = func(compiler_state)
2021-07-06T06:32:25.5826357Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.5826837Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.5827565Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.5828012Z lower.lower()
2021-07-06T06:32:25.5828688Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.5829302Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.5830262Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.5830783Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.5831550Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.5832025Z self.lower_block(block)
2021-07-06T06:32:25.5832730Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.5833188Z self.lower_inst(inst)
2021-07-06T06:32:25.5833827Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.5834274Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.5834668Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5835147Z
2021-07-06T06:32:25.5835897Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.5838486Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.5839944Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.5840902Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.5842295Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.5843354Z tb = None
2021-07-06T06:32:25.5843468Z
2021-07-06T06:32:25.5843712Z @contextlib.contextmanager
2021-07-06T06:32:25.5844087Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.5844410Z """
2021-07-06T06:32:25.5844766Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.5845379Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.5845850Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.5846296Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.5846670Z constructor.
2021-07-06T06:32:25.5847237Z
2021-07-06T06:32:25.5847790Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.5848962Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.5849495Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.5849824Z """
2021-07-06T06:32:25.5850406Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.5850727Z
2021-07-06T06:32:25.5851139Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.5851572Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.5851965Z loc_info.update(kwargs)
2021-07-06T06:32:25.5852233Z
2021-07-06T06:32:25.5852452Z try:
2021-07-06T06:32:25.5852709Z yield
2021-07-06T06:32:25.5852989Z except NumbaError as e:
2021-07-06T06:32:25.5853331Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.5853655Z raise
2021-07-06T06:32:25.5853931Z except Exception as e:
2021-07-06T06:32:25.5854312Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.5854745Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.5855143Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.5855876Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.5856599Z E No threading layer could be loaded.
2021-07-06T06:32:25.5857099Z E HINT:
2021-07-06T06:32:25.5857642Z E Intel TBB is required, try:
2021-07-06T06:32:25.5858178Z E $ conda/pip install tbb
2021-07-06T06:32:25.5858832Z E 
2021-07-06T06:32:25.5859878Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.5860603Z E def compute_membership_strengths(
2021-07-06T06:32:25.5861140Z E <source elided>
2021-07-06T06:32:25.5861597Z E 
2021-07-06T06:32:25.5862183Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.5862906Z E ^
2021-07-06T06:32:25.5863369Z E 
2021-07-06T06:32:25.5865031Z E During: lowering "id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.5865838Z
2021-07-06T06:32:25.5866495Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.5867265Z _____________ ERROR at setup of test_scatterplots[multipanel-fn3] ______________
2021-07-06T06:32:25.5867521Z
2021-07-06T06:32:25.5867942Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.5869015Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.5870265Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.5871330Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.5872546Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.5873229Z tb = None
2021-07-06T06:32:25.5873338Z
2021-07-06T06:32:25.5873593Z @contextlib.contextmanager
2021-07-06T06:32:25.5873931Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.5874264Z """
2021-07-06T06:32:25.5874588Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.5875038Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.5875477Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.5875923Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.5876263Z constructor.
2021-07-06T06:32:25.5876505Z
2021-07-06T06:32:25.5876826Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.5877277Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.5877705Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.5878029Z """
2021-07-06T06:32:25.5879592Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.5879929Z
2021-07-06T06:32:25.5880402Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.5880823Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.5881258Z loc_info.update(kwargs)
2021-07-06T06:32:25.5881518Z
2021-07-06T06:32:25.5881762Z try:
2021-07-06T06:32:25.5882012Z > yield
2021-07-06T06:32:25.5882294Z
2021-07-06T06:32:25.5882905Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.5883408Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5883629Z
2021-07-06T06:32:25.5883926Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5884596Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.5884868Z
2021-07-06T06:32:25.5885146Z def lower_block(self, block):
2021-07-06T06:32:25.5885422Z """
2021-07-06T06:32:25.5885854Z Lower the given block.
2021-07-06T06:32:25.5886104Z """
2021-07-06T06:32:25.5886370Z self.pre_block(block)
2021-07-06T06:32:25.5886842Z for inst in block.body:
2021-07-06T06:32:25.5887178Z self.loc = inst.loc
2021-07-06T06:32:25.5887682Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.5888674Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.5889159Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.5889554Z > self.lower_inst(inst)
2021-07-06T06:32:25.5889724Z
2021-07-06T06:32:25.5890314Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.5890837Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5891060Z
2021-07-06T06:32:25.5891338Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5892411Z inst = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.5893044Z
2021-07-06T06:32:25.5893308Z def lower_inst(self, inst):
2021-07-06T06:32:25.5893685Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.5894065Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.5894420Z self.debug_print(str(inst))
2021-07-06T06:32:25.5894744Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.5895104Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5895435Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.5895786Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.5896056Z
2021-07-06T06:32:25.5896348Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.5896699Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.5897022Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.5897533Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.5897809Z
2021-07-06T06:32:25.5898104Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.5898504Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.5899004Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.5899437Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.5899731Z
2021-07-06T06:32:25.5900015Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.5900371Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.5900717Z self.builder.branch(target)
2021-07-06T06:32:25.5900981Z
2021-07-06T06:32:25.5901283Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.5901640Z if self.generator_info:
2021-07-06T06:32:25.5902505Z # StopIteration
2021-07-06T06:32:25.5902865Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.5903223Z return
2021-07-06T06:32:25.5903531Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5903893Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.5904220Z ty = self.fndesc.restype
2021-07-06T06:32:25.5904696Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.5905099Z # If returning an optional type
2021-07-06T06:32:25.5905498Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.5905877Z return
2021-07-06T06:32:25.5906157Z assert ty == oty, (
2021-07-06T06:32:25.5906854Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.5907308Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.5907902Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.5908208Z
2021-07-06T06:32:25.5908529Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.5908918Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5909262Z assert signature is not None
2021-07-06T06:32:25.5909573Z try:
2021-07-06T06:32:25.5910162Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.5910596Z except NotImplementedError:
2021-07-06T06:32:25.5910988Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.5911419Z inst.value, signature)
2021-07-06T06:32:25.5911756Z else:
2021-07-06T06:32:25.5912092Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5912462Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5912847Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.5913250Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.5913672Z signature.args[2])
2021-07-06T06:32:25.5914181Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.5914499Z
2021-07-06T06:32:25.5914805Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.5915139Z self.lower_print(inst)
2021-07-06T06:32:25.5915415Z
2021-07-06T06:32:25.5915704Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.5916088Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5916430Z assert signature is not None
2021-07-06T06:32:25.5916824Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.5917221Z signature)
2021-07-06T06:32:25.5917499Z
2021-07-06T06:32:25.5917806Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.5918181Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5918540Z assert signature is not None
2021-07-06T06:32:25.5918932Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.5919280Z
2021-07-06T06:32:25.5919568Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.5919954Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5920312Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.5920609Z
2021-07-06T06:32:25.5920894Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5921255Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.5921554Z
2021-07-06T06:32:25.5921834Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5922191Z assert signature is not None
2021-07-06T06:32:25.5922457Z
2021-07-06T06:32:25.5922727Z op = operator.delitem
2021-07-06T06:32:25.5923094Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.5923483Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.5923855Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.5924193Z )
2021-07-06T06:32:25.5924507Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.5924805Z
2021-07-06T06:32:25.5925100Z assert targetty == signature.args[0]
2021-07-06T06:32:25.5925483Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.5925898Z signature.args[1])
2021-07-06T06:32:25.5926191Z
2021-07-06T06:32:25.5926500Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.5926941Z
2021-07-06T06:32:25.5927227Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.5927548Z self.delvar(inst.value)
2021-07-06T06:32:25.5927797Z
2021-07-06T06:32:25.5928175Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.5928529Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.5928911Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.5929262Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.5929552Z
2021-07-06T06:32:25.5929827Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.5930192Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.5930520Z assert signature is not None
2021-07-06T06:32:25.5930843Z assert signature.args[0] == targetty
2021-07-06T06:32:25.5931618Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.5932262Z
2021-07-06T06:32:25.5932561Z # Convert argument to match
2021-07-06T06:32:25.5932919Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.5933322Z signature.args[1])
2021-07-06T06:32:25.5933805Z
2021-07-06T06:32:25.5934116Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.5934575Z
2021-07-06T06:32:25.5934880Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.5935416Z self.lower_static_raise(inst)
2021-07-06T06:32:25.5935678Z
2021-07-06T06:32:25.5935990Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.5936352Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.5936631Z
2021-07-06T06:32:25.5936851Z else:
2021-07-06T06:32:25.5937202Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.5937777Z if isinstance(inst, _class):
2021-07-06T06:32:25.5938142Z > func(self, inst)
2021-07-06T06:32:25.5938302Z
2021-07-06T06:32:25.5939884Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.5940474Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.5940719Z
2021-07-06T06:32:25.5941013Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.5942168Z parfor = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.5942737Z
2021-07-06T06:32:25.5943058Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.5944214Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.5944784Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.5945194Z The general approach is as follows:
2021-07-06T06:32:25.5945903Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.5946336Z in the context of the current function.
2021-07-06T06:32:25.5946734Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.5947202Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.5947968Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.5948413Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.5948845Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.5949239Z the final reduction values.
2021-07-06T06:32:25.5949517Z """
2021-07-06T06:32:25.5949845Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.5950147Z
2021-07-06T06:32:25.5950402Z ensure_parallel_support()
2021-07-06T06:32:25.5950750Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.5951085Z targetctx = lowerer.context
2021-07-06T06:32:25.5951697Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.5952746Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.5953179Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.5953595Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.5954035Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.5954542Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5955264Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.5955631Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.5955947Z varmap = lowerer.varmap
2021-07-06T06:32:25.5956192Z
2021-07-06T06:32:25.5956456Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5956800Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.5957097Z parfor.dump()
2021-07-06T06:32:25.5957720Z
2021-07-06T06:32:25.5958152Z loc = parfor.init_block.loc
2021-07-06T06:32:25.5958488Z scope = parfor.init_block.scope
2021-07-06T06:32:25.5958766Z
2021-07-06T06:32:25.5959057Z # produce instructions for init_block
2021-07-06T06:32:25.5959399Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5960362Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.5960824Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.5961194Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5961583Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.5961933Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.5962214Z
2021-07-06T06:32:25.5962491Z for racevar in parfor.races:
2021-07-06T06:32:25.5962860Z if racevar not in varmap:
2021-07-06T06:32:25.5963202Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.5963538Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.5963913Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.5964363Z
2021-07-06T06:32:25.5964608Z alias_map = {}
2021-07-06T06:32:25.5964870Z arg_aliases = {}
2021-07-06T06:32:25.5965253Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.5965719Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.5966128Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5967854Z print("alias_map", alias_map)
2021-07-06T06:32:25.5968226Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.5968493Z
2021-07-06T06:32:25.5968819Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.5969285Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.5969660Z assert parfor.params is not None
2021-07-06T06:32:25.5970000Z
2021-07-06T06:32:25.5970301Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.5970784Z parfor, parfor.params)
2021-07-06T06:32:25.5971156Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.5971793Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.5972824Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5973299Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.5973702Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.5974025Z
2021-07-06T06:32:25.5974305Z # init reduction array allocation here.
2021-07-06T06:32:25.5974639Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.5974948Z redarrs = {}
2021-07-06T06:32:25.5975226Z if nredvars > 0:
2021-07-06T06:32:25.5975600Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.5976367Z thread_count = get_thread_count()
2021-07-06T06:32:25.5976920Z scope = parfor.init_block.scope
2021-07-06T06:32:25.5977584Z loc = parfor.init_block.loc
2021-07-06T06:32:25.5977989Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.5978330Z
2021-07-06T06:32:25.5978603Z # For each reduction variable...
2021-07-06T06:32:25.5978965Z for i in range(nredvars):
2021-07-06T06:32:25.5979355Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.5979781Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.5980184Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.5980578Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.5980936Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.5981396Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.5981764Z
2021-07-06T06:32:25.5982070Z # If this is reduction over an array,
2021-07-06T06:32:25.5982833Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.5983329Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.5983852Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.5984177Z else:
2021-07-06T06:32:25.5984795Z redarrdim = 1
2021-07-06T06:32:25.5985048Z
2021-07-06T06:32:25.5985403Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.5985744Z
2021-07-06T06:32:25.5986206Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.5986575Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.5986915Z fobj=np.empty,
2021-07-06T06:32:25.5987226Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.5987544Z args=(
2021-07-06T06:32:25.5988245Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.5988616Z types.DType(reddtype),
2021-07-06T06:32:25.5989667Z ),
2021-07-06T06:32:25.5989931Z )
2021-07-06T06:32:25.5990180Z
2021-07-06T06:32:25.5990543Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.5991017Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.5991373Z cval=thread_count,
2021-07-06T06:32:25.5991705Z typ=types.intp,
2021-07-06T06:32:25.5992252Z name='num_threads',
2021-07-06T06:32:25.5992571Z )
2021-07-06T06:32:25.5992803Z
2021-07-06T06:32:25.5993082Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.5993381Z
2021-07-06T06:32:25.5993675Z # If this is a reduction over an array...
2021-07-06T06:32:25.5994117Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.5994587Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.5995012Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.5995391Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.5995829Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.5996215Z name="redarr_shape",
2021-07-06T06:32:25.5996532Z )
2021-07-06T06:32:25.5996769Z
2021-07-06T06:32:25.5997154Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.5997808Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.5998594Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.5999090Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.5999644Z typ=types.intp,
2021-07-06T06:32:25.5999999Z name="redshapeonedim",
2021-07-06T06:32:25.6000306Z )
2021-07-06T06:32:25.6000645Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.6000929Z
2021-07-06T06:32:25.6001305Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.6002124Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.6003580Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.6003967Z )
2021-07-06T06:32:25.6004202Z
2021-07-06T06:32:25.6004524Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.6004939Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.6005275Z
2021-07-06T06:32:25.6005544Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.6005996Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.6006555Z )
2021-07-06T06:32:25.6006792Z
2021-07-06T06:32:25.6007590Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.6008047Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.6008345Z
2021-07-06T06:32:25.6008636Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.6009025Z if init_val is not None:
2021-07-06T06:32:25.6009436Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.6009905Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.6010316Z # First, create a variable for np.full.
2021-07-06T06:32:25.6010728Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.6011088Z fobj=np.full,
2021-07-06T06:32:25.6011461Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.6011797Z args=(
2021-07-06T06:32:25.6012179Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.6012552Z reddtype,
2021-07-06T06:32:25.6012890Z types.DType(reddtype),
2021-07-06T06:32:25.6013226Z ),
2021-07-06T06:32:25.6013662Z )
2021-07-06T06:32:25.6013926Z
2021-07-06T06:32:25.6014239Z # Then create a var with the identify value.
2021-07-06T06:32:25.6014818Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.6015174Z cval=init_val,
2021-07-06T06:32:25.6015509Z typ=reddtype,
2021-07-06T06:32:25.6015832Z name="init_val",
2021-07-06T06:32:25.6016144Z )
2021-07-06T06:32:25.6016382Z
2021-07-06T06:32:25.6016744Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.6017198Z full_call = pfbdr.call(
2021-07-06T06:32:25.6017581Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.6017947Z )
2021-07-06T06:32:25.6018179Z
2021-07-06T06:32:25.6018464Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.6018796Z rhs=full_call,
2021-07-06T06:32:25.6019134Z typ=redvar_typ,
2021-07-06T06:32:25.6019462Z name="redtoset",
2021-07-06T06:32:25.6019774Z )
2021-07-06T06:32:25.6020055Z else:
2021-07-06T06:32:25.6020391Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.6020755Z cval=init_val,
2021-07-06T06:32:25.6021177Z typ=reddtype,
2021-07-06T06:32:25.6021894Z name="redtoset",
2021-07-06T06:32:25.6022198Z )
2021-07-06T06:32:25.6022487Z else:
2021-07-06T06:32:25.6023040Z redtoset = redvar
2021-07-06T06:32:25.6023319Z
2021-07-06T06:32:25.6023636Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.6024127Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.6024967Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.6025302Z
2021-07-06T06:32:25.6025613Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.6025977Z cval=res_print_str,
2021-07-06T06:32:25.6026339Z typ=strconsttyp,
2021-07-06T06:32:25.6026717Z name="str_const",
2021-07-06T06:32:25.6027048Z )
2021-07-06T06:32:25.6027292Z
2021-07-06T06:32:25.6027761Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.6028263Z vararg=None, loc=loc)
2021-07-06T06:32:25.6028686Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.6029151Z typemap[lhs.name],
2021-07-06T06:32:25.6029605Z typemap[redvar.name])
2021-07-06T06:32:25.6030039Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.6030405Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.6030699Z
2021-07-06T06:32:25.6030899Z
2021-07-06T06:32:25.6031584Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.6032069Z for j in range(thread_count):
2021-07-06T06:32:25.6032464Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.6032847Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.6033407Z )
2021-07-06T06:32:25.6034087Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.6034437Z
2021-07-06T06:32:25.6034772Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.6035167Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.6036269Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.6036912Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.6037399Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.6037838Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.6038930Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.6039397Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.6039832Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.6040171Z try:
2021-07-06T06:32:25.6040444Z (func,
2021-07-06T06:32:25.6040711Z func_args,
2021-07-06T06:32:25.6040981Z func_sig,
2021-07-06T06:32:25.6041963Z redargstartdim,
2021-07-06T06:32:25.6042266Z func_arg_types,
2021-07-06T06:32:25.6042640Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.6043070Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.6043506Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.6043838Z finally:
2021-07-06T06:32:25.6044195Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.6044509Z
2021-07-06T06:32:25.6044958Z # get the shape signature
2021-07-06T06:32:25.6045558Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.6046603Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.6047553Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.6047959Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6048311Z print("func_args = ", func_args)
2021-07-06T06:32:25.6048642Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.6049190Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.6049575Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.6050953Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.6051351Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.6051704Z parfor.get_shape_classes,
2021-07-06T06:32:25.6051999Z num_inputs,
2021-07-06T06:32:25.6052277Z num_reductions,
2021-07-06T06:32:25.6052584Z func_args,
2021-07-06T06:32:25.6052860Z redargstartdim,
2021-07-06T06:32:25.6053152Z func_sig,
2021-07-06T06:32:25.6053578Z parfor.races,
2021-07-06T06:32:25.6054113Z typemap)
2021-07-06T06:32:25.6054426Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6054797Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.6055084Z
2021-07-06T06:32:25.6055411Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.6055877Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.6056272Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6056646Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.6057010Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.6058119Z call_parallel_gufunc(
2021-07-06T06:32:25.6058417Z lowerer,
2021-07-06T06:32:25.6058704Z func,
2021-07-06T06:32:25.6058969Z gu_signature,
2021-07-06T06:32:25.6059242Z func_sig,
2021-07-06T06:32:25.6059525Z func_args,
2021-07-06T06:32:25.6060258Z func_arg_types,
2021-07-06T06:32:25.6060600Z loop_ranges,
2021-07-06T06:32:25.6061223Z parfor_redvars,
2021-07-06T06:32:25.6061552Z parfor_reddict,
2021-07-06T06:32:25.6062786Z redarrs,
2021-07-06T06:32:25.6063109Z parfor.init_block,
2021-07-06T06:32:25.6063399Z index_var_typ,
2021-07-06T06:32:25.6063678Z parfor.races,
2021-07-06T06:32:25.6064339Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.6064663Z
2021-07-06T06:32:25.6065808Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.6066518Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6066741Z
2021-07-06T06:32:25.6067681Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6068419Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16a86e8e10>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.6069357Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.6069902Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.6070513Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.6070961Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.6071353Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.6071990Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.6072488Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.6072853Z
2021-07-06T06:32:25.6073197Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.6073717Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.6074186Z exp_name_to_tuple_var):
2021-07-06T06:32:25.6074684Z '''
2021-07-06T06:32:25.6075013Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.6075475Z '''
2021-07-06T06:32:25.6075744Z context = lowerer.context
2021-07-06T06:32:25.6076035Z builder = lowerer.builder
2021-07-06T06:32:25.6076300Z
2021-07-06T06:32:25.6076598Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.6076982Z get_thread_count,
2021-07-06T06:32:25.6077322Z _launch_threads)
2021-07-06T06:32:25.6077609Z
2021-07-06T06:32:25.6077876Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6078221Z print("make_parallel_loop")
2021-07-06T06:32:25.6078585Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.6079067Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.6079434Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.6079762Z print("expr_args", expr_args)
2021-07-06T06:32:25.6080112Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.6080454Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.6080739Z
2021-07-06T06:32:25.6080994Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.6081363Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.6081952Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.6082338Z sin, sout = gu_signature
2021-07-06T06:32:25.6082593Z
2021-07-06T06:32:25.6082922Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.6083314Z > _launch_threads()
2021-07-06T06:32:25.6083455Z
2021-07-06T06:32:25.6084157Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.6084715Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6084946Z
2021-07-06T06:32:25.6085216Z def _launch_threads():
2021-07-06T06:32:25.6086536Z if not _backend_init_process_lock:
2021-07-06T06:32:25.6086925Z _set_init_process_lock()
2021-07-06T06:32:25.6087188Z
2021-07-06T06:32:25.6087476Z with _backend_init_process_lock:
2021-07-06T06:32:25.6088183Z with _backend_init_thread_lock:
2021-07-06T06:32:25.6088682Z global _is_initialized
2021-07-06T06:32:25.6089018Z if _is_initialized:
2021-07-06T06:32:25.6089320Z return
2021-07-06T06:32:25.6089764Z
2021-07-06T06:32:25.6090074Z def select_known_backend(backend):
2021-07-06T06:32:25.6090433Z """
2021-07-06T06:32:25.6090789Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.6091170Z """
2021-07-06T06:32:25.6091602Z lib = None
2021-07-06T06:32:25.6092113Z if backend.startswith("tbb"):
2021-07-06T06:32:25.6092492Z try:
2021-07-06T06:32:25.6092858Z # check if TBB is present and compatible
2021-07-06T06:32:25.6093280Z _check_tbb_version_compatible()
2021-07-06T06:32:25.6094066Z # now try and load the backend
2021-07-06T06:32:25.6094572Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.6094975Z except ImportError:
2021-07-06T06:32:25.6095332Z pass
2021-07-06T06:32:25.6095854Z elif backend.startswith("omp"):
2021-07-06T06:32:25.6096318Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.6096773Z # that understands GNU OMP might be present
2021-07-06T06:32:25.6097156Z try:
2021-07-06T06:32:25.6097528Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.6097928Z except ImportError:
2021-07-06T06:32:25.6098285Z pass
2021-07-06T06:32:25.6098653Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.6099098Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.6099458Z else:
2021-07-06T06:32:25.6099890Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.6100343Z raise ValueError(msg % backend)
2021-07-06T06:32:25.6100701Z return lib
2021-07-06T06:32:25.6100954Z
2021-07-06T06:32:25.6101974Z def select_from_backends(backends):
2021-07-06T06:32:25.6102338Z """
2021-07-06T06:32:25.6102863Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.6106374Z """
2021-07-06T06:32:25.6106707Z lib = None
2021-07-06T06:32:25.6107070Z for backend in backends:
2021-07-06T06:32:25.6107660Z lib = select_known_backend(backend)
2021-07-06T06:32:25.6108050Z if lib is not None:
2021-07-06T06:32:25.6108381Z break
2021-07-06T06:32:25.6108689Z else:
2021-07-06T06:32:25.6109467Z backend = ''
2021-07-06T06:32:25.6109807Z return lib, backend
2021-07-06T06:32:25.6110095Z
2021-07-06T06:32:25.6110388Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.6111000Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.6111313Z
2021-07-06T06:32:25.6111575Z lib = None
2021-07-06T06:32:25.6111882Z err_helpers = dict()
2021-07-06T06:32:25.6112499Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.6112960Z "$ conda/pip install tbb")
2021-07-06T06:32:25.6113638Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.6114328Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.6115215Z requirements = []
2021-07-06T06:32:25.6115531Z
2021-07-06T06:32:25.6115831Z def raise_with_hint(required):
2021-07-06T06:32:25.6116262Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.6116660Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.6117065Z if len(required) == 0:
2021-07-06T06:32:25.6118154Z hint = ''
2021-07-06T06:32:25.6118585Z if len(required) == 1:
2021-07-06T06:32:25.6118994Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.6119401Z if len(required) > 1:
2021-07-06T06:32:25.6120039Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.6120521Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.6120956Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.6121975Z
2021-07-06T06:32:25.6122363Z if t in namedbackends:
2021-07-06T06:32:25.6122816Z # Try and load the specific named backend
2021-07-06T06:32:25.6123211Z lib = select_known_backend(t)
2021-07-06T06:32:25.6123553Z if not lib:
2021-07-06T06:32:25.6124006Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.6124623Z # loading, set requirements for hinting
2021-07-06T06:32:25.6125299Z if t == 'tbb':
2021-07-06T06:32:25.6125866Z requirements.append('TBB')
2021-07-06T06:32:25.6126447Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.6127360Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.6127713Z libname = t
2021-07-06T06:32:25.6128514Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.6129118Z # User wants a specific behaviour...
2021-07-06T06:32:25.6130273Z available = ['tbb']
2021-07-06T06:32:25.6130790Z requirements.append('TBB')
2021-07-06T06:32:25.6131319Z if t == "safe":
2021-07-06T06:32:25.6131723Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.6132127Z pass
2021-07-06T06:32:25.6132463Z elif t == "threadsafe":
2021-07-06T06:32:25.6132841Z if _IS_OSX:
2021-07-06T06:32:25.6133602Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.6133996Z # omp is threadsafe everywhere
2021-07-06T06:32:25.6134545Z available.append('omp')
2021-07-06T06:32:25.6134914Z elif t == "forksafe":
2021-07-06T06:32:25.6135353Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.6135822Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.6136395Z # this to workqueue
2021-07-06T06:32:25.6136735Z if not _IS_LINUX:
2021-07-06T06:32:25.6137765Z available.append('omp')
2021-07-06T06:32:25.6138130Z if _IS_OSX:
2021-07-06T06:32:25.6138703Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.6139101Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.6139673Z available.append('workqueue')
2021-07-06T06:32:25.6140044Z else: # unreachable
2021-07-06T06:32:25.6140439Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.6140856Z raise ValueError(msg % t)
2021-07-06T06:32:25.6141207Z # select amongst available
2021-07-06T06:32:25.6141600Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.6142145Z elif t == 'default':
2021-07-06T06:32:25.6142569Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.6142937Z # workqueue
2021-07-06T06:32:25.6143868Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.6145096Z if not lib:
2021-07-06T06:32:25.6146162Z # set requirements for hinting
2021-07-06T06:32:25.6146980Z requirements.append('TBB')
2021-07-06T06:32:25.6147359Z if _IS_OSX:
2021-07-06T06:32:25.6147891Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.6148225Z else:
2021-07-06T06:32:25.6148804Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.6149206Z raise ValueError(msg % t)
2021-07-06T06:32:25.6149490Z
2021-07-06T06:32:25.6149759Z # No lib found, raise and hint
2021-07-06T06:32:25.6150265Z if not lib:
2021-07-06T06:32:25.6151936Z > raise_with_hint(requirements)
2021-07-06T06:32:25.6152146Z
2021-07-06T06:32:25.6152919Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.6154131Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6154386Z
2021-07-06T06:32:25.6154870Z required = ['TBB']
2021-07-06T06:32:25.6155008Z
2021-07-06T06:32:25.6155303Z def raise_with_hint(required):
2021-07-06T06:32:25.6155668Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.6156020Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.6156562Z if len(required) == 0:
2021-07-06T06:32:25.6156993Z hint = ''
2021-07-06T06:32:25.6157650Z if len(required) == 1:
2021-07-06T06:32:25.6157984Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.6158335Z if len(required) > 1:
2021-07-06T06:32:25.6159115Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.6159569Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.6159940Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.6160544Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.6161080Z E HINT:
2021-07-06T06:32:25.6161607Z E Intel TBB is required, try:
2021-07-06T06:32:25.6162331Z E $ conda/pip install tbb
2021-07-06T06:32:25.6162511Z
2021-07-06T06:32:25.6163175Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.6163495Z
2021-07-06T06:32:25.6164048Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.6164315Z
2021-07-06T06:32:25.6164593Z @pytest.fixture(scope="module")
2021-07-06T06:32:25.6164908Z def pbmc_scatterplots():
2021-07-06T06:32:25.6165255Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.6165603Z pbmc.layers["sparse"] = pbmc.raw.X / 2
2021-07-06T06:32:25.6165971Z pbmc.layers["test"] = pbmc.X.copy() + 100
2021-07-06T06:32:25.6166364Z pbmc.var["numbers"] = [str(x) for x in range(pbmc.shape[1])]
2021-07-06T06:32:25.6166736Z > sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.6166882Z
2021-07-06T06:32:25.6167535Z scanpy/tests/test_plotting.py:949:
2021-07-06T06:32:25.6167966Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6168561Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.6168934Z random_state=random_state,
2021-07-06T06:32:25.6169467Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.6169835Z self.n_neighbors,
2021-07-06T06:32:25.6170383Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.6170780Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.6171485Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.6171977Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.6172731Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.6173173Z raise e
2021-07-06T06:32:25.6173900Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.6174385Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.6175094Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.6175575Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.6176291Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.6176780Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.6177525Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.6178115Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.6178869Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.6179340Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.6180048Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.6180517Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.6181221Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.6183392Z return self._compile_bytecode()
2021-07-06T06:32:25.6184306Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.6185463Z return self._compile_core()
2021-07-06T06:32:25.6186383Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.6187136Z raise e
2021-07-06T06:32:25.6188512Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.6189128Z pm.run(self.state)
2021-07-06T06:32:25.6189792Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.6190442Z raise patched_exception
2021-07-06T06:32:25.6191140Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.6191648Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.6192392Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.6192915Z return func(*args, **kwargs)
2021-07-06T06:32:25.6193637Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.6194178Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.6195769Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.6196270Z mangled = func(compiler_state)
2021-07-06T06:32:25.6197599Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.6198173Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.6198982Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.6199459Z lower.lower()
2021-07-06T06:32:25.6200116Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.6200780Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.6201841Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.6202362Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.6203080Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.6203557Z self.lower_block(block)
2021-07-06T06:32:25.6205021Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.6205551Z self.lower_inst(inst)
2021-07-06T06:32:25.6206186Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.6206652Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.6207219Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6207450Z
2021-07-06T06:32:25.6207936Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.6209042Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.6211158Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.6212141Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.6213398Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.6214124Z tb = None
2021-07-06T06:32:25.6214259Z
2021-07-06T06:32:25.6214664Z @contextlib.contextmanager
2021-07-06T06:32:25.6215437Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.6215802Z """
2021-07-06T06:32:25.6216145Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.6217060Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.6217534Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.6217999Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.6219023Z constructor.
2021-07-06T06:32:25.6219307Z
2021-07-06T06:32:25.6219642Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.6220112Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.6220572Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.6220936Z """
2021-07-06T06:32:25.6221527Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.6221835Z
2021-07-06T06:32:25.6222281Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.6222701Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.6223129Z loc_info.update(kwargs)
2021-07-06T06:32:25.6223389Z
2021-07-06T06:32:25.6223636Z try:
2021-07-06T06:32:25.6223888Z yield
2021-07-06T06:32:25.6224195Z except NumbaError as e:
2021-07-06T06:32:25.6224692Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.6225178Z raise
2021-07-06T06:32:25.6225472Z except Exception as e:
2021-07-06T06:32:25.6226009Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.6226694Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.6227080Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.6227858Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.6228750Z E No threading layer could be loaded.
2021-07-06T06:32:25.6229294Z E HINT:
2021-07-06T06:32:25.6229837Z E Intel TBB is required, try:
2021-07-06T06:32:25.6230410Z E $ conda/pip install tbb
2021-07-06T06:32:25.6230884Z E 
2021-07-06T06:32:25.6231752Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.6232643Z E def compute_membership_strengths(
2021-07-06T06:32:25.6233175Z E <source elided>
2021-07-06T06:32:25.6234001Z E 
2021-07-06T06:32:25.6234886Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.6235618Z E ^
2021-07-06T06:32:25.6236054Z E 
2021-07-06T06:32:25.6237451Z E During: lowering "id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.6238246Z
2021-07-06T06:32:25.6239053Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.6239794Z _________ ERROR at setup of test_scatterplots[multipanel_vcenter-fn4] __________
2021-07-06T06:32:25.6240066Z
2021-07-06T06:32:25.6240507Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.6241560Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.6242949Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.6243883Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.6245314Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.6246749Z tb = None
2021-07-06T06:32:25.6246897Z
2021-07-06T06:32:25.6247143Z @contextlib.contextmanager
2021-07-06T06:32:25.6247516Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.6247843Z """
2021-07-06T06:32:25.6248197Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.6248648Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.6249115Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.6249560Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.6249930Z constructor.
2021-07-06T06:32:25.6250167Z
2021-07-06T06:32:25.6250513Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.6250964Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.6251411Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.6251773Z """
2021-07-06T06:32:25.6252357Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.6252686Z
2021-07-06T06:32:25.6253118Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.6253558Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.6253968Z loc_info.update(kwargs)
2021-07-06T06:32:25.6254245Z
2021-07-06T06:32:25.6254474Z try:
2021-07-06T06:32:25.6254741Z > yield
2021-07-06T06:32:25.6254870Z
2021-07-06T06:32:25.6255484Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.6256027Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6256255Z
2021-07-06T06:32:25.6256547Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6258857Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.6259316Z
2021-07-06T06:32:25.6259617Z def lower_block(self, block):
2021-07-06T06:32:25.6259923Z """
2021-07-06T06:32:25.6260184Z Lower the given block.
2021-07-06T06:32:25.6261248Z """
2021-07-06T06:32:25.6261603Z self.pre_block(block)
2021-07-06T06:32:25.6261938Z for inst in block.body:
2021-07-06T06:32:25.6262254Z self.loc = inst.loc
2021-07-06T06:32:25.6262621Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.6263396Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.6263891Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.6264843Z > self.lower_inst(inst)
2021-07-06T06:32:25.6265014Z
2021-07-06T06:32:25.6265757Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.6266464Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6266686Z
2021-07-06T06:32:25.6266984Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6268410Z inst = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.6268999Z
2021-07-06T06:32:25.6269266Z def lower_inst(self, inst):
2021-07-06T06:32:25.6269634Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.6270053Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.6270404Z self.debug_print(str(inst))
2021-07-06T06:32:25.6270757Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.6271113Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.6271475Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.6271832Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.6272128Z
2021-07-06T06:32:25.6273177Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.6273622Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.6273989Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.6274319Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.6274606Z
2021-07-06T06:32:25.6274885Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.6275306Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.6275791Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.6276241Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.6276520Z
2021-07-06T06:32:25.6276820Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.6277175Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.6277507Z self.builder.branch(target)
2021-07-06T06:32:25.6277795Z
2021-07-06T06:32:25.6279046Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.6279509Z if self.generator_info:
2021-07-06T06:32:25.6279847Z # StopIteration
2021-07-06T06:32:25.6280443Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.6280761Z return
2021-07-06T06:32:25.6281076Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.6281587Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.6282074Z ty = self.fndesc.restype
2021-07-06T06:32:25.6282434Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.6283477Z # If returning an optional type
2021-07-06T06:32:25.6283921Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.6284286Z return
2021-07-06T06:32:25.6284587Z assert ty == oty, (
2021-07-06T06:32:25.6285437Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.6285921Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.6286347Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.6286670Z
2021-07-06T06:32:25.6286975Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.6287372Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6287720Z assert signature is not None
2021-07-06T06:32:25.6288016Z try:
2021-07-06T06:32:25.6288597Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.6289015Z except NotImplementedError:
2021-07-06T06:32:25.6289429Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.6289845Z inst.value, signature)
2021-07-06T06:32:25.6290202Z else:
2021-07-06T06:32:25.6290531Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.6290923Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.6291293Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.6292333Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.6292780Z signature.args[2])
2021-07-06T06:32:25.6293186Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.6293522Z
2021-07-06T06:32:25.6293809Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.6294165Z self.lower_print(inst)
2021-07-06T06:32:25.6294584Z
2021-07-06T06:32:25.6295056Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.6295584Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6295932Z assert signature is not None
2021-07-06T06:32:25.6296671Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.6297268Z signature)
2021-07-06T06:32:25.6297911Z
2021-07-06T06:32:25.6298895Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.6299319Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6299664Z assert signature is not None
2021-07-06T06:32:25.6300070Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.6300405Z
2021-07-06T06:32:25.6300866Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.6301401Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.6302107Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.6302382Z
2021-07-06T06:32:25.6302666Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.6303695Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.6304001Z
2021-07-06T06:32:25.6304308Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6305764Z assert signature is not None
2021-07-06T06:32:25.6306079Z
2021-07-06T06:32:25.6306334Z op = operator.delitem
2021-07-06T06:32:25.6306725Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.6307101Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.6307487Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.6307812Z )
2021-07-06T06:32:25.6308125Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.6308443Z
2021-07-06T06:32:25.6308720Z assert targetty == signature.args[0]
2021-07-06T06:32:25.6309750Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.6310226Z signature.args[1])
2021-07-06T06:32:25.6310547Z
2021-07-06T06:32:25.6310837Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.6311321Z
2021-07-06T06:32:25.6311601Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.6311935Z self.delvar(inst.value)
2021-07-06T06:32:25.6312211Z
2021-07-06T06:32:25.6312505Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.6312892Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.6313251Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.6313624Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6313908Z
2021-07-06T06:32:25.6314208Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.6314570Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.6314927Z assert signature is not None
2021-07-06T06:32:25.6315266Z assert signature.args[0] == targetty
2021-07-06T06:32:25.6315644Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.6315972Z
2021-07-06T06:32:25.6316236Z # Convert argument to match
2021-07-06T06:32:25.6316623Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.6317018Z signature.args[1])
2021-07-06T06:32:25.6317433Z
2021-07-06T06:32:25.6317720Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.6318025Z
2021-07-06T06:32:25.6318324Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.6318686Z self.lower_static_raise(inst)
2021-07-06T06:32:25.6318972Z
2021-07-06T06:32:25.6319432Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.6319808Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.6320073Z
2021-07-06T06:32:25.6320311Z else:
2021-07-06T06:32:25.6320641Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.6321054Z if isinstance(inst, _class):
2021-07-06T06:32:25.6321390Z > func(self, inst)
2021-07-06T06:32:25.6321542Z
2021-07-06T06:32:25.6322496Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.6323034Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6323271Z
2021-07-06T06:32:25.6323586Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6325244Z parfor = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.6325859Z
2021-07-06T06:32:25.6326192Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.6328117Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.6328592Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.6328972Z The general approach is as follows:
2021-07-06T06:32:25.6329696Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.6330119Z in the context of the current function.
2021-07-06T06:32:25.6330699Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.6331132Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.6331568Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.6331975Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.6332405Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.6333445Z the final reduction values.
2021-07-06T06:32:25.6333743Z """
2021-07-06T06:32:25.6334049Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.6334357Z
2021-07-06T06:32:25.6334604Z ensure_parallel_support()
2021-07-06T06:32:25.6334924Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.6335457Z targetctx = lowerer.context
2021-07-06T06:32:25.6336121Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.6336597Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.6337149Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.6337972Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.6338767Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.6339134Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6339497Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.6340275Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.6340590Z varmap = lowerer.varmap
2021-07-06T06:32:25.6341003Z
2021-07-06T06:32:25.6341467Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6341955Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.6342280Z parfor.dump()
2021-07-06T06:32:25.6342515Z
2021-07-06T06:32:25.6342781Z loc = parfor.init_block.loc
2021-07-06T06:32:25.6343290Z scope = parfor.init_block.scope
2021-07-06T06:32:25.6343701Z
2021-07-06T06:32:25.6343958Z # produce instructions for init_block
2021-07-06T06:32:25.6344275Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6344982Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.6345398Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.6345775Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6346133Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.6346808Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.6347063Z
2021-07-06T06:32:25.6347347Z for racevar in parfor.races:
2021-07-06T06:32:25.6347685Z if racevar not in varmap:
2021-07-06T06:32:25.6348027Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.6349374Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.6349811Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.6350139Z
2021-07-06T06:32:25.6350377Z alias_map = {}
2021-07-06T06:32:25.6350665Z arg_aliases = {}
2021-07-06T06:32:25.6351044Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.6351542Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.6351946Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6352298Z print("alias_map", alias_map)
2021-07-06T06:32:25.6352634Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.6352924Z
2021-07-06T06:32:25.6353263Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.6354606Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.6355040Z assert parfor.params is not None
2021-07-06T06:32:25.6355479Z
2021-07-06T06:32:25.6355814Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.6356185Z parfor, parfor.params)
2021-07-06T06:32:25.6356591Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.6357193Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.6357963Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6358322Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.6359353Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.6359665Z
2021-07-06T06:32:25.6359936Z # init reduction array allocation here.
2021-07-06T06:32:25.6360610Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.6360911Z redarrs = {}
2021-07-06T06:32:25.6361205Z if nredvars > 0:
2021-07-06T06:32:25.6361553Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.6362104Z thread_count = get_thread_count()
2021-07-06T06:32:25.6362617Z scope = parfor.init_block.scope
2021-07-06T06:32:25.6362970Z loc = parfor.init_block.loc
2021-07-06T06:32:25.6363808Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.6364180Z
2021-07-06T06:32:25.6364455Z # For each reduction variable...
2021-07-06T06:32:25.6364801Z for i in range(nredvars):
2021-07-06T06:32:25.6365210Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.6365619Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.6366040Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.6366416Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.6366789Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6367243Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.6367624Z
2021-07-06T06:32:25.6367912Z # If this is reduction over an array,
2021-07-06T06:32:25.6368822Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.6369303Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.6369733Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.6370059Z else:
2021-07-06T06:32:25.6370354Z redarrdim = 1
2021-07-06T06:32:25.6370626Z
2021-07-06T06:32:25.6370974Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.6371345Z
2021-07-06T06:32:25.6371647Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.6372057Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.6372405Z fobj=np.empty,
2021-07-06T06:32:25.6372767Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.6373458Z args=(
2021-07-06T06:32:25.6373841Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.6374238Z types.DType(reddtype),
2021-07-06T06:32:25.6374546Z ),
2021-07-06T06:32:25.6374823Z )
2021-07-06T06:32:25.6375051Z
2021-07-06T06:32:25.6375431Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.6375887Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.6376259Z cval=thread_count,
2021-07-06T06:32:25.6376573Z typ=types.intp,
2021-07-06T06:32:25.6377178Z name='num_threads',
2021-07-06T06:32:25.6377485Z )
2021-07-06T06:32:25.6377714Z
2021-07-06T06:32:25.6378185Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.6378464Z
2021-07-06T06:32:25.6378765Z # If this is a reduction over an array...
2021-07-06T06:32:25.6379351Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.6380165Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.6380785Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.6381502Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.6381907Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.6382500Z name="redarr_shape",
2021-07-06T06:32:25.6382804Z )
2021-07-06T06:32:25.6383040Z
2021-07-06T06:32:25.6384169Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.6385014Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.6385753Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.6386162Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.6386588Z typ=types.intp,
2021-07-06T06:32:25.6386937Z name="redshapeonedim",
2021-07-06T06:32:25.6387270Z )
2021-07-06T06:32:25.6387599Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.6387908Z
2021-07-06T06:32:25.6388280Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.6388752Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.6389427Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.6389766Z )
2021-07-06T06:32:25.6390017Z
2021-07-06T06:32:25.6390321Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.6390752Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.6391078Z
2021-07-06T06:32:25.6391363Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.6391851Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.6392208Z )
2021-07-06T06:32:25.6392439Z
2021-07-06T06:32:25.6393077Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.6393566Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.6393848Z
2021-07-06T06:32:25.6394167Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.6394550Z if init_val is not None:
2021-07-06T06:32:25.6394993Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.6395463Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.6395906Z # First, create a variable for np.full.
2021-07-06T06:32:25.6396321Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.6396711Z fobj=np.full,
2021-07-06T06:32:25.6397074Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.6397440Z args=(
2021-07-06T06:32:25.6397814Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.6398216Z reddtype,
2021-07-06T06:32:25.6398568Z types.DType(reddtype),
2021-07-06T06:32:25.6399066Z ),
2021-07-06T06:32:25.6399358Z )
2021-07-06T06:32:25.6399592Z
2021-07-06T06:32:25.6399909Z # Then create a var with the identify value.
2021-07-06T06:32:25.6400306Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.6400680Z cval=init_val,
2021-07-06T06:32:25.6401005Z typ=reddtype,
2021-07-06T06:32:25.6401343Z name="init_val",
2021-07-06T06:32:25.6401835Z )
2021-07-06T06:32:25.6402078Z
2021-07-06T06:32:25.6402826Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.6403325Z full_call = pfbdr.call(
2021-07-06T06:32:25.6403747Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.6404112Z )
2021-07-06T06:32:25.6405212Z
2021-07-06T06:32:25.6406756Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.6407202Z rhs=full_call,
2021-07-06T06:32:25.6407539Z typ=redvar_typ,
2021-07-06T06:32:25.6407894Z name="redtoset",
2021-07-06T06:32:25.6408202Z )
2021-07-06T06:32:25.6408651Z else:
2021-07-06T06:32:25.6409021Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.6409384Z cval=init_val,
2021-07-06T06:32:25.6409737Z typ=reddtype,
2021-07-06T06:32:25.6410069Z name="redtoset",
2021-07-06T06:32:25.6410393Z )
2021-07-06T06:32:25.6410672Z else:
2021-07-06T06:32:25.6410990Z redtoset = redvar
2021-07-06T06:32:25.6411253Z
2021-07-06T06:32:25.6411566Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.6412501Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.6413067Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.6413412Z
2021-07-06T06:32:25.6413703Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.6414085Z cval=res_print_str,
2021-07-06T06:32:25.6414855Z typ=strconsttyp,
2021-07-06T06:32:25.6415258Z name="str_const",
2021-07-06T06:32:25.6415723Z )
2021-07-06T06:32:25.6415985Z
2021-07-06T06:32:25.6417242Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.6417656Z vararg=None, loc=loc)
2021-07-06T06:32:25.6418098Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.6418547Z typemap[lhs.name],
2021-07-06T06:32:25.6419017Z typemap[redvar.name])
2021-07-06T06:32:25.6419434Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.6419816Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.6420094Z
2021-07-06T06:32:25.6420324Z
2021-07-06T06:32:25.6421053Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.6421562Z for j in range(thread_count):
2021-07-06T06:32:25.6421937Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.6422336Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.6422664Z )
2021-07-06T06:32:25.6423023Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.6423344Z
2021-07-06T06:32:25.6423663Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.6424056Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.6424684Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.6425336Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.6425783Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.6427416Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.6427912Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.6428327Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.6428732Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.6429075Z try:
2021-07-06T06:32:25.6429329Z (func,
2021-07-06T06:32:25.6429607Z func_args,
2021-07-06T06:32:25.6429878Z func_sig,
2021-07-06T06:32:25.6430153Z redargstartdim,
2021-07-06T06:32:25.6430458Z func_arg_types,
2021-07-06T06:32:25.6431493Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.6431969Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.6432541Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.6433405Z finally:
2021-07-06T06:32:25.6433735Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.6434053Z
2021-07-06T06:32:25.6435182Z # get the shape signature
2021-07-06T06:32:25.6435793Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.6436861Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.6437580Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.6438022Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6438517Z print("func_args = ", func_args)
2021-07-06T06:32:25.6438866Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.6439219Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.6439605Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.6439963Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.6440327Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.6441098Z parfor.get_shape_classes,
2021-07-06T06:32:25.6441424Z num_inputs,
2021-07-06T06:32:25.6441694Z num_reductions,
2021-07-06T06:32:25.6442126Z func_args,
2021-07-06T06:32:25.6442414Z redargstartdim,
2021-07-06T06:32:25.6442680Z func_sig,
2021-07-06T06:32:25.6442956Z parfor.races,
2021-07-06T06:32:25.6443214Z typemap)
2021-07-06T06:32:25.6443521Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6443861Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.6444137Z
2021-07-06T06:32:25.6444470Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.6444901Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.6445296Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6445639Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.6446010Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.6446319Z call_parallel_gufunc(
2021-07-06T06:32:25.6446600Z lowerer,
2021-07-06T06:32:25.6446853Z func,
2021-07-06T06:32:25.6447124Z gu_signature,
2021-07-06T06:32:25.6447385Z func_sig,
2021-07-06T06:32:25.6447640Z func_args,
2021-07-06T06:32:25.6447923Z func_arg_types,
2021-07-06T06:32:25.6448191Z loop_ranges,
2021-07-06T06:32:25.6448477Z parfor_redvars,
2021-07-06T06:32:25.6448749Z parfor_reddict,
2021-07-06T06:32:25.6449030Z redarrs,
2021-07-06T06:32:25.6449296Z parfor.init_block,
2021-07-06T06:32:25.6449587Z index_var_typ,
2021-07-06T06:32:25.6449856Z parfor.races,
2021-07-06T06:32:25.6450136Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.6450351Z
2021-07-06T06:32:25.6451134Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.6451699Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6451922Z
2021-07-06T06:32:25.6452214Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6452892Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16a86e8e10>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.6453698Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.6454250Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.6454833Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.6455300Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.6455673Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.6456326Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.6456920Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.6457122Z
2021-07-06T06:32:25.6457475Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.6457977Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.6458626Z exp_name_to_tuple_var):
2021-07-06T06:32:25.6460164Z '''
2021-07-06T06:32:25.6460525Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.6460963Z '''
2021-07-06T06:32:25.6461221Z context = lowerer.context
2021-07-06T06:32:25.6461522Z builder = lowerer.builder
2021-07-06T06:32:25.6461938Z
2021-07-06T06:32:25.6462430Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.6462971Z get_thread_count,
2021-07-06T06:32:25.6463339Z _launch_threads)
2021-07-06T06:32:25.6463608Z
2021-07-06T06:32:25.6464218Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6464695Z print("make_parallel_loop")
2021-07-06T06:32:25.6465096Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.6465493Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.6465850Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.6466209Z print("expr_args", expr_args)
2021-07-06T06:32:25.6466554Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.6466925Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.6467202Z
2021-07-06T06:32:25.6467639Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.6467992Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.6468417Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.6468778Z sin, sout = gu_signature
2021-07-06T06:32:25.6469704Z
2021-07-06T06:32:25.6470666Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.6471049Z > _launch_threads()
2021-07-06T06:32:25.6471211Z
2021-07-06T06:32:25.6471949Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.6472506Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6472729Z
2021-07-06T06:32:25.6472971Z def _launch_threads():
2021-07-06T06:32:25.6473318Z if not _backend_init_process_lock:
2021-07-06T06:32:25.6473652Z _set_init_process_lock()
2021-07-06T06:32:25.6473922Z
2021-07-06T06:32:25.6474652Z with _backend_init_process_lock:
2021-07-06T06:32:25.6475031Z with _backend_init_thread_lock:
2021-07-06T06:32:25.6475406Z global _is_initialized
2021-07-06T06:32:25.6475726Z if _is_initialized:
2021-07-06T06:32:25.6476048Z return
2021-07-06T06:32:25.6476289Z
2021-07-06T06:32:25.6476604Z def select_known_backend(backend):
2021-07-06T06:32:25.6477177Z """
2021-07-06T06:32:25.6477527Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.6477861Z """
2021-07-06T06:32:25.6478122Z lib = None
2021-07-06T06:32:25.6478463Z if backend.startswith("tbb"):
2021-07-06T06:32:25.6478797Z try:
2021-07-06T06:32:25.6479154Z # check if TBB is present and compatible
2021-07-06T06:32:25.6479531Z _check_tbb_version_compatible()
2021-07-06T06:32:25.6479907Z # now try and load the backend
2021-07-06T06:32:25.6480280Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.6480834Z except ImportError:
2021-07-06T06:32:25.6481150Z pass
2021-07-06T06:32:25.6481502Z elif backend.startswith("omp"):
2021-07-06T06:32:25.6481914Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.6482343Z # that understands GNU OMP might be present
2021-07-06T06:32:25.6482685Z try:
2021-07-06T06:32:25.6483386Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.6483800Z except ImportError:
2021-07-06T06:32:25.6484117Z pass
2021-07-06T06:32:25.6484477Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.6484873Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.6485222Z else:
2021-07-06T06:32:25.6485616Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.6486694Z raise ValueError(msg % backend)
2021-07-06T06:32:25.6487583Z return lib
2021-07-06T06:32:25.6487837Z
2021-07-06T06:32:25.6488124Z def select_from_backends(backends):
2021-07-06T06:32:25.6488616Z """
2021-07-06T06:32:25.6488984Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.6489517Z """
2021-07-06T06:32:25.6489815Z lib = None
2021-07-06T06:32:25.6490154Z for backend in backends:
2021-07-06T06:32:25.6490556Z lib = select_known_backend(backend)
2021-07-06T06:32:25.6490940Z if lib is not None:
2021-07-06T06:32:25.6491299Z break
2021-07-06T06:32:25.6491600Z else:
2021-07-06T06:32:25.6492210Z backend = ''
2021-07-06T06:32:25.6492556Z return lib, backend
2021-07-06T06:32:25.6492823Z
2021-07-06T06:32:25.6493277Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.6494071Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.6494400Z
2021-07-06T06:32:25.6494950Z lib = None
2021-07-06T06:32:25.6495424Z err_helpers = dict()
2021-07-06T06:32:25.6497881Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.6498584Z "$ conda/pip install tbb")
2021-07-06T06:32:25.6499297Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.6499962Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.6500321Z requirements = []
2021-07-06T06:32:25.6500560Z
2021-07-06T06:32:25.6500854Z def raise_with_hint(required):
2021-07-06T06:32:25.6501247Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.6501632Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.6501983Z if len(required) == 0:
2021-07-06T06:32:25.6502467Z hint = ''
2021-07-06T06:32:25.6502792Z if len(required) == 1:
2021-07-06T06:32:25.6503174Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.6503535Z if len(required) > 1:
2021-07-06T06:32:25.6504128Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.6504707Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.6505105Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.6505390Z
2021-07-06T06:32:25.6505652Z if t in namedbackends:
2021-07-06T06:32:25.6506194Z # Try and load the specific named backend
2021-07-06T06:32:25.6507765Z lib = select_known_backend(t)
2021-07-06T06:32:25.6508157Z if not lib:
2021-07-06T06:32:25.6508548Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.6509006Z # loading, set requirements for hinting
2021-07-06T06:32:25.6509666Z if t == 'tbb':
2021-07-06T06:32:25.6510241Z requirements.append('TBB')
2021-07-06T06:32:25.6512066Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.6512651Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.6513366Z libname = t
2021-07-06T06:32:25.6513926Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.6515033Z # User wants a specific behaviour...
2021-07-06T06:32:25.6516044Z available = ['tbb']
2021-07-06T06:32:25.6516723Z requirements.append('TBB')
2021-07-06T06:32:25.6517448Z if t == "safe":
2021-07-06T06:32:25.6518022Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.6518776Z pass
2021-07-06T06:32:25.6519132Z elif t == "threadsafe":
2021-07-06T06:32:25.6519494Z if _IS_OSX:
2021-07-06T06:32:25.6520093Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.6520487Z # omp is threadsafe everywhere
2021-07-06T06:32:25.6521162Z available.append('omp')
2021-07-06T06:32:25.6521527Z elif t == "forksafe":
2021-07-06T06:32:25.6522096Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.6522746Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.6523150Z # this to workqueue
2021-07-06T06:32:25.6523527Z if not _IS_LINUX:
2021-07-06T06:32:25.6524219Z available.append('omp')
2021-07-06T06:32:25.6524574Z if _IS_OSX:
2021-07-06T06:32:25.6525101Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.6525502Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.6526030Z available.append('workqueue')
2021-07-06T06:32:25.6526403Z else: # unreachable
2021-07-06T06:32:25.6526785Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.6527166Z raise ValueError(msg % t)
2021-07-06T06:32:25.6527519Z # select amongst available
2021-07-06T06:32:25.6527881Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.6528423Z elif t == 'default':
2021-07-06T06:32:25.6528813Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.6529193Z # workqueue
2021-07-06T06:32:25.6529536Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.6529919Z if not lib:
2021-07-06T06:32:25.6530257Z # set requirements for hinting
2021-07-06T06:32:25.6530798Z requirements.append('TBB')
2021-07-06T06:32:25.6531147Z if _IS_OSX:
2021-07-06T06:32:25.6531667Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.6532021Z else:
2021-07-06T06:32:25.6532575Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.6532995Z raise ValueError(msg % t)
2021-07-06T06:32:25.6533441Z
2021-07-06T06:32:25.6533733Z # No lib found, raise and hint
2021-07-06T06:32:25.6535176Z if not lib:
2021-07-06T06:32:25.6535556Z > raise_with_hint(requirements)
2021-07-06T06:32:25.6536021Z
2021-07-06T06:32:25.6536913Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.6537627Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6538027Z
2021-07-06T06:32:25.6539294Z required = ['TBB']
2021-07-06T06:32:25.6539470Z
2021-07-06T06:32:25.6539905Z def raise_with_hint(required):
2021-07-06T06:32:25.6540276Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.6540613Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.6540921Z if len(required) == 0:
2021-07-06T06:32:25.6541367Z hint = ''
2021-07-06T06:32:25.6541661Z if len(required) == 1:
2021-07-06T06:32:25.6542017Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.6542350Z if len(required) > 1:
2021-07-06T06:32:25.6544079Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.6544719Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.6545112Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.6545872Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.6546403Z E HINT:
2021-07-06T06:32:25.6546910Z E Intel TBB is required, try:
2021-07-06T06:32:25.6547425Z E $ conda/pip install tbb
2021-07-06T06:32:25.6547613Z
2021-07-06T06:32:25.6549276Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.6549616Z
2021-07-06T06:32:25.6550247Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.6550513Z
2021-07-06T06:32:25.6550773Z @pytest.fixture(scope="module")
2021-07-06T06:32:25.6551538Z def pbmc_scatterplots():
2021-07-06T06:32:25.6551884Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.6552257Z pbmc.layers["sparse"] = pbmc.raw.X / 2
2021-07-06T06:32:25.6553118Z pbmc.layers["test"] = pbmc.X.copy() + 100
2021-07-06T06:32:25.6553545Z pbmc.var["numbers"] = [str(x) for x in range(pbmc.shape[1])]
2021-07-06T06:32:25.6553886Z > sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.6554025Z
2021-07-06T06:32:25.6554583Z scanpy/tests/test_plotting.py:949:
2021-07-06T06:32:25.6554998Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6555617Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.6556147Z random_state=random_state,
2021-07-06T06:32:25.6557661Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.6558047Z self.n_neighbors,
2021-07-06T06:32:25.6558778Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.6559176Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.6559875Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.6560731Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.6561470Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.6561925Z raise e
2021-07-06T06:32:25.6562580Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.6563085Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.6563771Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.6564271Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.6564965Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.6565815Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.6566597Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.6567132Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.6567869Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.6568375Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.6569084Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.6569585Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.6570294Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.6570791Z return self._compile_bytecode()
2021-07-06T06:32:25.6571516Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.6572118Z return self._compile_core()
2021-07-06T06:32:25.6572842Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.6573298Z raise e
2021-07-06T06:32:25.6573960Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.6574433Z pm.run(self.state)
2021-07-06T06:32:25.6575120Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.6575606Z raise patched_exception
2021-07-06T06:32:25.6576301Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.6576787Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.6577562Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.6578213Z return func(*args, **kwargs)
2021-07-06T06:32:25.6578922Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.6579416Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.6580145Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.6580610Z mangled = func(compiler_state)
2021-07-06T06:32:25.6581629Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.6582338Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.6583301Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.6583751Z lower.lower()
2021-07-06T06:32:25.6585219Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.6585776Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.6586643Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.6587163Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.6587931Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.6588403Z self.lower_block(block)
2021-07-06T06:32:25.6589110Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.6589567Z self.lower_inst(inst)
2021-07-06T06:32:25.6590401Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.6590849Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.6591264Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6591494Z
2021-07-06T06:32:25.6591934Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.6593055Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.6595144Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.6596149Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.6597617Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.6598485Z tb = None
2021-07-06T06:32:25.6598598Z
2021-07-06T06:32:25.6598852Z @contextlib.contextmanager
2021-07-06T06:32:25.6599192Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.6599678Z """
2021-07-06T06:32:25.6600035Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.6600487Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.6600951Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.6601612Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.6601972Z constructor.
2021-07-06T06:32:25.6602204Z
2021-07-06T06:32:25.6603280Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.6603781Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.6604248Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.6604575Z """
2021-07-06T06:32:25.6605143Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.6605464Z
2021-07-06T06:32:25.6605871Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.6606292Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.6606685Z loc_info.update(kwargs)
2021-07-06T06:32:25.6606949Z
2021-07-06T06:32:25.6607170Z try:
2021-07-06T06:32:25.6607604Z yield
2021-07-06T06:32:25.6608503Z except NumbaError as e:
2021-07-06T06:32:25.6647162Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.6647762Z raise
2021-07-06T06:32:25.6648206Z except Exception as e:
2021-07-06T06:32:25.6648595Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.6649041Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.6649443Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.6650680Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.6652037Z E No threading layer could be loaded.
2021-07-06T06:32:25.6652626Z E HINT:
2021-07-06T06:32:25.6653204Z E Intel TBB is required, try:
2021-07-06T06:32:25.6653763Z E $ conda/pip install tbb
2021-07-06T06:32:25.6654250Z E 
2021-07-06T06:32:25.6654987Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.6656488Z E def compute_membership_strengths(
2021-07-06T06:32:25.6657013Z E <source elided>
2021-07-06T06:32:25.6657469Z E 
2021-07-06T06:32:25.6658036Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.6658550Z E ^
2021-07-06T06:32:25.6658995Z E 
2021-07-06T06:32:25.6661229Z E During: lowering "id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.6662085Z
2021-07-06T06:32:25.6662866Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.6663841Z __________ ERROR at setup of test_scatterplots[pca_sparse_layer-fn5] ___________
2021-07-06T06:32:25.6664249Z
2021-07-06T06:32:25.6664873Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.6665981Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.6667225Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.6668387Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.6670310Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.6671108Z tb = None
2021-07-06T06:32:25.6671249Z
2021-07-06T06:32:25.6671496Z @contextlib.contextmanager
2021-07-06T06:32:25.6671845Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.6672185Z """
2021-07-06T06:32:25.6672526Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.6673031Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.6673481Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.6673942Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.6674295Z constructor.
2021-07-06T06:32:25.6674547Z
2021-07-06T06:32:25.6674880Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.6675355Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.6675805Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.6676148Z """
2021-07-06T06:32:25.6676755Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.6677065Z
2021-07-06T06:32:25.6677509Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.6677930Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.6678359Z loc_info.update(kwargs)
2021-07-06T06:32:25.6678620Z
2021-07-06T06:32:25.6678865Z try:
2021-07-06T06:32:25.6679798Z > yield
2021-07-06T06:32:25.6679945Z
2021-07-06T06:32:25.6680856Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.6681370Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6681750Z
2021-07-06T06:32:25.6682061Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6682769Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.6683251Z
2021-07-06T06:32:25.6683524Z def lower_block(self, block):
2021-07-06T06:32:25.6683963Z """
2021-07-06T06:32:25.6684232Z Lower the given block.
2021-07-06T06:32:25.6684486Z """
2021-07-06T06:32:25.6684752Z self.pre_block(block)
2021-07-06T06:32:25.6685050Z for inst in block.body:
2021-07-06T06:32:25.6685447Z self.loc = inst.loc
2021-07-06T06:32:25.6685784Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.6686581Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.6687183Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.6687593Z > self.lower_inst(inst)
2021-07-06T06:32:25.6687775Z
2021-07-06T06:32:25.6688391Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.6689036Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6689268Z
2021-07-06T06:32:25.6689559Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6690843Z inst = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.6691723Z
2021-07-06T06:32:25.6691979Z def lower_inst(self, inst):
2021-07-06T06:32:25.6692353Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.6692738Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.6693091Z self.debug_print(str(inst))
2021-07-06T06:32:25.6693423Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.6693779Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.6694621Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.6695026Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.6695298Z
2021-07-06T06:32:25.6695592Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.6696170Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.6696701Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.6697035Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.6697298Z
2021-07-06T06:32:25.6697660Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.6698046Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.6698529Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.6698946Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.6699240Z
2021-07-06T06:32:25.6699515Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.6699868Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.6700191Z self.builder.branch(target)
2021-07-06T06:32:25.6700446Z
2021-07-06T06:32:25.6700739Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.6702028Z if self.generator_info:
2021-07-06T06:32:25.6702439Z # StopIteration
2021-07-06T06:32:25.6702767Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.6703100Z return
2021-07-06T06:32:25.6703398Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.6703750Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.6704068Z ty = self.fndesc.restype
2021-07-06T06:32:25.6704408Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.6705099Z # If returning an optional type
2021-07-06T06:32:25.6705502Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.6706379Z return
2021-07-06T06:32:25.6707040Z assert ty == oty, (
2021-07-06T06:32:25.6709473Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.6709983Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.6710426Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.6710729Z
2021-07-06T06:32:25.6711048Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.6711431Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6711774Z assert signature is not None
2021-07-06T06:32:25.6712086Z try:
2021-07-06T06:32:25.6712660Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.6713463Z except NotImplementedError:
2021-07-06T06:32:25.6713873Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.6714320Z inst.value, signature)
2021-07-06T06:32:25.6714658Z else:
2021-07-06T06:32:25.6715187Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.6715563Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.6715950Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.6716349Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.6718681Z signature.args[2])
2021-07-06T06:32:25.6719110Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.6719426Z
2021-07-06T06:32:25.6719734Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.6720075Z self.lower_print(inst)
2021-07-06T06:32:25.6720350Z
2021-07-06T06:32:25.6720641Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.6721043Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6721390Z assert signature is not None
2021-07-06T06:32:25.6721783Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.6722186Z signature)
2021-07-06T06:32:25.6722481Z
2021-07-06T06:32:25.6722774Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.6723145Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6723511Z assert signature is not None
2021-07-06T06:32:25.6724106Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.6724444Z
2021-07-06T06:32:25.6724723Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.6725094Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.6725439Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.6725727Z
2021-07-06T06:32:25.6726830Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.6728603Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.6728934Z
2021-07-06T06:32:25.6729218Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6729593Z assert signature is not None
2021-07-06T06:32:25.6729859Z
2021-07-06T06:32:25.6730131Z op = operator.delitem
2021-07-06T06:32:25.6730494Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.6730884Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.6731250Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.6731588Z )
2021-07-06T06:32:25.6731901Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.6732201Z
2021-07-06T06:32:25.6732497Z assert targetty == signature.args[0]
2021-07-06T06:32:25.6732879Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.6733472Z signature.args[1])
2021-07-06T06:32:25.6734429Z
2021-07-06T06:32:25.6734782Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.6735088Z
2021-07-06T06:32:25.6735406Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.6735743Z self.delvar(inst.value)
2021-07-06T06:32:25.6736002Z
2021-07-06T06:32:25.6736309Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.6736678Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.6737053Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.6737408Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.6737709Z
2021-07-06T06:32:25.6737994Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.6738371Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.6738713Z assert signature is not None
2021-07-06T06:32:25.6739065Z assert signature.args[0] == targetty
2021-07-06T06:32:25.6739451Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.6739760Z
2021-07-06T06:32:25.6740040Z # Convert argument to match
2021-07-06T06:32:25.6740952Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.6741396Z signature.args[1])
2021-07-06T06:32:25.6741690Z
2021-07-06T06:32:25.6741996Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.6742288Z
2021-07-06T06:32:25.6742601Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.6742963Z self.lower_static_raise(inst)
2021-07-06T06:32:25.6743233Z
2021-07-06T06:32:25.6743556Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.6743929Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.6744220Z
2021-07-06T06:32:25.6744448Z else:
2021-07-06T06:32:25.6744973Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.6745400Z if isinstance(inst, _class):
2021-07-06T06:32:25.6746141Z > func(self, inst)
2021-07-06T06:32:25.6746305Z
2021-07-06T06:32:25.6763803Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.6770195Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6787388Z
2021-07-06T06:32:25.6787839Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6789380Z parfor = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.6789991Z
2021-07-06T06:32:25.6790314Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.6790740Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.6791148Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.6791522Z The general approach is as follows:
2021-07-06T06:32:25.6792182Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.6792587Z in the context of the current function.
2021-07-06T06:32:25.6793013Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.6793450Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.6793898Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.6794324Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.6794775Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.6795151Z the final reduction values.
2021-07-06T06:32:25.6795450Z """
2021-07-06T06:32:25.6795761Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.6796262Z
2021-07-06T06:32:25.6796521Z ensure_parallel_support()
2021-07-06T06:32:25.6796852Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.6797217Z targetctx = lowerer.context
2021-07-06T06:32:25.6797839Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.6798318Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.6798708Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.6799131Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.6799697Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.6800804Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6801395Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.6802616Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.6803110Z varmap = lowerer.varmap
2021-07-06T06:32:25.6803388Z
2021-07-06T06:32:25.6803652Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6803980Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.6804525Z parfor.dump()
2021-07-06T06:32:25.6804763Z
2021-07-06T06:32:25.6805033Z loc = parfor.init_block.loc
2021-07-06T06:32:25.6805337Z scope = parfor.init_block.scope
2021-07-06T06:32:25.6805794Z
2021-07-06T06:32:25.6806227Z # produce instructions for init_block
2021-07-06T06:32:25.6806573Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6806961Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.6807391Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.6808203Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6808576Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.6809101Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.6809374Z
2021-07-06T06:32:25.6810290Z for racevar in parfor.races:
2021-07-06T06:32:25.6810661Z if racevar not in varmap:
2021-07-06T06:32:25.6811020Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.6811372Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.6811747Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.6812035Z
2021-07-06T06:32:25.6812274Z alias_map = {}
2021-07-06T06:32:25.6812564Z arg_aliases = {}
2021-07-06T06:32:25.6812943Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.6813441Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.6813847Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6814203Z print("alias_map", alias_map)
2021-07-06T06:32:25.6814539Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.6814833Z
2021-07-06T06:32:25.6815171Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.6815655Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.6816051Z assert parfor.params is not None
2021-07-06T06:32:25.6816333Z
2021-07-06T06:32:25.6816650Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.6817014Z parfor, parfor.params)
2021-07-06T06:32:25.6817421Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.6817878Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.6818289Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6818661Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.6819078Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.6819382Z
2021-07-06T06:32:25.6819680Z # init reduction array allocation here.
2021-07-06T06:32:25.6820174Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.6820482Z redarrs = {}
2021-07-06T06:32:25.6820763Z if nredvars > 0:
2021-07-06T06:32:25.6821129Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.6821528Z thread_count = get_thread_count()
2021-07-06T06:32:25.6821866Z scope = parfor.init_block.scope
2021-07-06T06:32:25.6822211Z loc = parfor.init_block.loc
2021-07-06T06:32:25.6822596Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.6823698Z
2021-07-06T06:32:25.6824010Z # For each reduction variable...
2021-07-06T06:32:25.6824374Z for i in range(nredvars):
2021-07-06T06:32:25.6824934Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.6825348Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.6825772Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.6826164Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.6826539Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6827149Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.6827533Z
2021-07-06T06:32:25.6827822Z # If this is reduction over an array,
2021-07-06T06:32:25.6828583Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.6829064Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.6829500Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.6829826Z else:
2021-07-06T06:32:25.6830139Z redarrdim = 1
2021-07-06T06:32:25.6830397Z
2021-07-06T06:32:25.6830745Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.6831116Z
2021-07-06T06:32:25.6831428Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.6832568Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.6832953Z fobj=np.empty,
2021-07-06T06:32:25.6833310Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.6833636Z args=(
2021-07-06T06:32:25.6833994Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.6834367Z types.DType(reddtype),
2021-07-06T06:32:25.6834692Z ),
2021-07-06T06:32:25.6834955Z )
2021-07-06T06:32:25.6835184Z
2021-07-06T06:32:25.6835566Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.6836022Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.6836393Z cval=thread_count,
2021-07-06T06:32:25.6836707Z typ=types.intp,
2021-07-06T06:32:25.6837330Z name='num_threads',
2021-07-06T06:32:25.6837643Z )
2021-07-06T06:32:25.6837897Z
2021-07-06T06:32:25.6838180Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.6838490Z
2021-07-06T06:32:25.6838787Z # If this is a reduction over an array...
2021-07-06T06:32:25.6839211Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.6839693Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.6840101Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.6840502Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.6841076Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.6841463Z name="redarr_shape",
2021-07-06T06:32:25.6841754Z )
2021-07-06T06:32:25.6842003Z
2021-07-06T06:32:25.6842560Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.6843244Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.6843640Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.6844067Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.6844469Z typ=types.intp,
2021-07-06T06:32:25.6845212Z name="redshapeonedim",
2021-07-06T06:32:25.6845698Z )
2021-07-06T06:32:25.6846014Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.6846537Z
2021-07-06T06:32:25.6846908Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.6847385Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.6848001Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.6848360Z )
2021-07-06T06:32:25.6848593Z
2021-07-06T06:32:25.6848914Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.6849429Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.6849749Z
2021-07-06T06:32:25.6850040Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.6850567Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.6850908Z )
2021-07-06T06:32:25.6851130Z
2021-07-06T06:32:25.6851756Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.6852208Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.6852499Z
2021-07-06T06:32:25.6852958Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.6853512Z if init_val is not None:
2021-07-06T06:32:25.6853924Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.6855149Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.6855836Z # First, create a variable for np.full.
2021-07-06T06:32:25.6856260Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.6856981Z fobj=np.full,
2021-07-06T06:32:25.6857343Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.6857892Z args=(
2021-07-06T06:32:25.6858287Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.6858684Z reddtype,
2021-07-06T06:32:25.6859023Z types.DType(reddtype),
2021-07-06T06:32:25.6859362Z ),
2021-07-06T06:32:25.6859639Z )
2021-07-06T06:32:25.6859954Z
2021-07-06T06:32:25.6860256Z # Then create a var with the identify value.
2021-07-06T06:32:25.6860656Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.6861032Z cval=init_val,
2021-07-06T06:32:25.6861357Z typ=reddtype,
2021-07-06T06:32:25.6862550Z name="init_val",
2021-07-06T06:32:25.6862881Z )
2021-07-06T06:32:25.6863300Z
2021-07-06T06:32:25.6863665Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.6864297Z full_call = pfbdr.call(
2021-07-06T06:32:25.6867584Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.6867989Z )
2021-07-06T06:32:25.6868370Z
2021-07-06T06:32:25.6868652Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.6869019Z rhs=full_call,
2021-07-06T06:32:25.6891049Z typ=redvar_typ,
2021-07-06T06:32:25.6891513Z name="redtoset",
2021-07-06T06:32:25.6891824Z )
2021-07-06T06:32:25.6892189Z else:
2021-07-06T06:32:25.6892542Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.6893019Z cval=init_val,
2021-07-06T06:32:25.6893356Z typ=reddtype,
2021-07-06T06:32:25.6893773Z name="redtoset",
2021-07-06T06:32:25.6894085Z )
2021-07-06T06:32:25.6894369Z else:
2021-07-06T06:32:25.6894726Z redtoset = redvar
2021-07-06T06:32:25.6894991Z
2021-07-06T06:32:25.6895362Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.6895854Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.6897453Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.6897809Z
2021-07-06T06:32:25.6898159Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.6898710Z cval=res_print_str,
2021-07-06T06:32:25.6899056Z typ=strconsttyp,
2021-07-06T06:32:25.6899461Z name="str_const",
2021-07-06T06:32:25.6899769Z )
2021-07-06T06:32:25.6900070Z
2021-07-06T06:32:25.6900374Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.6900886Z vararg=None, loc=loc)
2021-07-06T06:32:25.6901325Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.6901852Z typemap[lhs.name],
2021-07-06T06:32:25.6902322Z typemap[redvar.name])
2021-07-06T06:32:25.6902821Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.6903201Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.6903549Z
2021-07-06T06:32:25.6903759Z
2021-07-06T06:32:25.6904816Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.6905559Z for j in range(thread_count):
2021-07-06T06:32:25.6905949Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.6907053Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.6907382Z )
2021-07-06T06:32:25.6907784Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.6908107Z
2021-07-06T06:32:25.6908481Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.6909048Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.6909686Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.6910973Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.6911559Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.6912003Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.6912405Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.6912850Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.6913254Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.6913636Z try:
2021-07-06T06:32:25.6913888Z (func,
2021-07-06T06:32:25.6914229Z func_args,
2021-07-06T06:32:25.6914500Z func_sig,
2021-07-06T06:32:25.6914833Z redargstartdim,
2021-07-06T06:32:25.6915124Z func_arg_types,
2021-07-06T06:32:25.6915478Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.6916178Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.6916595Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.6916994Z finally:
2021-07-06T06:32:25.6917335Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.6917758Z
2021-07-06T06:32:25.6918016Z # get the shape signature
2021-07-06T06:32:25.6918608Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.6918959Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.6919614Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.6921455Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6921890Z print("func_args = ", func_args)
2021-07-06T06:32:25.6922389Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.6922744Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.6923359Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.6923730Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.6924144Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.6925114Z parfor.get_shape_classes,
2021-07-06T06:32:25.6925456Z num_inputs,
2021-07-06T06:32:25.6925907Z num_reductions,
2021-07-06T06:32:25.6926240Z func_args,
2021-07-06T06:32:25.6926515Z redargstartdim,
2021-07-06T06:32:25.6927607Z func_sig,
2021-07-06T06:32:25.6928069Z parfor.races,
2021-07-06T06:32:25.6928333Z typemap)
2021-07-06T06:32:25.6928860Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6929212Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.6929577Z
2021-07-06T06:32:25.6929907Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.6930406Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.6930813Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.6931221Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.6931589Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.6931910Z call_parallel_gufunc(
2021-07-06T06:32:25.6932410Z lowerer,
2021-07-06T06:32:25.6932658Z func,
2021-07-06T06:32:25.6932966Z gu_signature,
2021-07-06T06:32:25.6933229Z func_sig,
2021-07-06T06:32:25.6934510Z func_args,
2021-07-06T06:32:25.6934814Z func_arg_types,
2021-07-06T06:32:25.6935196Z loop_ranges,
2021-07-06T06:32:25.6935473Z parfor_redvars,
2021-07-06T06:32:25.6935745Z parfor_reddict,
2021-07-06T06:32:25.6936064Z redarrs,
2021-07-06T06:32:25.6936332Z parfor.init_block,
2021-07-06T06:32:25.6936684Z index_var_typ,
2021-07-06T06:32:25.6937593Z parfor.races,
2021-07-06T06:32:25.6938003Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.6938158Z
2021-07-06T06:32:25.6939511Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.6940542Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.6940768Z
2021-07-06T06:32:25.6941054Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.6941766Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16a86e8e10>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.6942609Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.6943224Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.6943806Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.6944609Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.7027530Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.7028443Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.7029006Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.7029216Z
2021-07-06T06:32:25.7029564Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.7030103Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.7030584Z exp_name_to_tuple_var):
2021-07-06T06:32:25.7031090Z '''
2021-07-06T06:32:25.7031429Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.7031910Z '''
2021-07-06T06:32:25.7032188Z context = lowerer.context
2021-07-06T06:32:25.7032511Z builder = lowerer.builder
2021-07-06T06:32:25.7032776Z
2021-07-06T06:32:25.7033101Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.7033661Z get_thread_count,
2021-07-06T06:32:25.7034015Z _launch_threads)
2021-07-06T06:32:25.7034315Z
2021-07-06T06:32:25.7034589Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7035774Z print("make_parallel_loop")
2021-07-06T06:32:25.7036187Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.7036607Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.7036964Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.7037323Z print("expr_args", expr_args)
2021-07-06T06:32:25.7037669Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.7038039Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.7038319Z
2021-07-06T06:32:25.7038597Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.7038980Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.7039400Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.7039792Z sin, sout = gu_signature
2021-07-06T06:32:25.7040048Z
2021-07-06T06:32:25.7040401Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.7040767Z > _launch_threads()
2021-07-06T06:32:25.7040908Z
2021-07-06T06:32:25.7041700Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.7042688Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7042977Z
2021-07-06T06:32:25.7043269Z def _launch_threads():
2021-07-06T06:32:25.7043614Z if not _backend_init_process_lock:
2021-07-06T06:32:25.7043976Z _set_init_process_lock()
2021-07-06T06:32:25.7044251Z
2021-07-06T06:32:25.7044587Z with _backend_init_process_lock:
2021-07-06T06:32:25.7044964Z with _backend_init_thread_lock:
2021-07-06T06:32:25.7045339Z global _is_initialized
2021-07-06T06:32:25.7045670Z if _is_initialized:
2021-07-06T06:32:25.7046000Z return
2021-07-06T06:32:25.7046393Z
2021-07-06T06:32:25.7046688Z def select_known_backend(backend):
2021-07-06T06:32:25.7047208Z """
2021-07-06T06:32:25.7047714Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.7048079Z """
2021-07-06T06:32:25.7048596Z lib = None
2021-07-06T06:32:25.7048964Z if backend.startswith("tbb"):
2021-07-06T06:32:25.7049328Z try:
2021-07-06T06:32:25.7049710Z # check if TBB is present and compatible
2021-07-06T06:32:25.7050116Z _check_tbb_version_compatible()
2021-07-06T06:32:25.7050689Z # now try and load the backend
2021-07-06T06:32:25.7051111Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.7051515Z except ImportError:
2021-07-06T06:32:25.7051873Z pass
2021-07-06T06:32:25.7052229Z elif backend.startswith("omp"):
2021-07-06T06:32:25.7053230Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.7054723Z # that understands GNU OMP might be present
2021-07-06T06:32:25.7055195Z try:
2021-07-06T06:32:25.7055564Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.7055980Z except ImportError:
2021-07-06T06:32:25.7056941Z pass
2021-07-06T06:32:25.7057356Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.7057801Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.7058398Z else:
2021-07-06T06:32:25.7059104Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.7059560Z raise ValueError(msg % backend)
2021-07-06T06:32:25.7059914Z return lib
2021-07-06T06:32:25.7060166Z
2021-07-06T06:32:25.7060818Z def select_from_backends(backends):
2021-07-06T06:32:25.7061191Z """
2021-07-06T06:32:25.7061573Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.7061939Z """
2021-07-06T06:32:25.7062235Z lib = None
2021-07-06T06:32:25.7062575Z for backend in backends:
2021-07-06T06:32:25.7062959Z lib = select_known_backend(backend)
2021-07-06T06:32:25.7063493Z if lib is not None:
2021-07-06T06:32:25.7063833Z break
2021-07-06T06:32:25.7064142Z else:
2021-07-06T06:32:25.7064975Z backend = ''
2021-07-06T06:32:25.7065346Z return lib, backend
2021-07-06T06:32:25.7065604Z
2021-07-06T06:32:25.7065898Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.7066641Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.7066953Z
2021-07-06T06:32:25.7067216Z lib = None
2021-07-06T06:32:25.7067512Z err_helpers = dict()
2021-07-06T06:32:25.7068122Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.7069724Z "$ conda/pip install tbb")
2021-07-06T06:32:25.7070542Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.7071240Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.7071665Z requirements = []
2021-07-06T06:32:25.7071923Z
2021-07-06T06:32:25.7072239Z def raise_with_hint(required):
2021-07-06T06:32:25.7072659Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.7073055Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.7073444Z if len(required) == 0:
2021-07-06T06:32:25.7073950Z hint = ''
2021-07-06T06:32:25.7074319Z if len(required) == 1:
2021-07-06T06:32:25.7074709Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.7075500Z if len(required) > 1:
2021-07-06T06:32:25.7076246Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.7076753Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.7077846Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.7078352Z
2021-07-06T06:32:25.7078636Z if t in namedbackends:
2021-07-06T06:32:25.7079031Z # Try and load the specific named backend
2021-07-06T06:32:25.7079414Z lib = select_known_backend(t)
2021-07-06T06:32:25.7079758Z if not lib:
2021-07-06T06:32:25.7081184Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.7081644Z # loading, set requirements for hinting
2021-07-06T06:32:25.7084225Z if t == 'tbb':
2021-07-06T06:32:25.7084827Z requirements.append('TBB')
2021-07-06T06:32:25.7085432Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.7086019Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7086395Z libname = t
2021-07-06T06:32:25.7086954Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.7087414Z # User wants a specific behaviour...
2021-07-06T06:32:25.7087927Z available = ['tbb']
2021-07-06T06:32:25.7088431Z requirements.append('TBB')
2021-07-06T06:32:25.7088960Z if t == "safe":
2021-07-06T06:32:25.7089364Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.7089746Z pass
2021-07-06T06:32:25.7090078Z elif t == "threadsafe":
2021-07-06T06:32:25.7090447Z if _IS_OSX:
2021-07-06T06:32:25.7091020Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7091424Z # omp is threadsafe everywhere
2021-07-06T06:32:25.7091951Z available.append('omp')
2021-07-06T06:32:25.7092327Z elif t == "forksafe":
2021-07-06T06:32:25.7092747Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.7093229Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.7093633Z # this to workqueue
2021-07-06T06:32:25.7093989Z if not _IS_LINUX:
2021-07-06T06:32:25.7094534Z available.append('omp')
2021-07-06T06:32:25.7094898Z if _IS_OSX:
2021-07-06T06:32:25.7095447Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7095847Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.7096401Z available.append('workqueue')
2021-07-06T06:32:25.7096773Z else: # unreachable
2021-07-06T06:32:25.7097175Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.7097574Z raise ValueError(msg % t)
2021-07-06T06:32:25.7097932Z # select amongst available
2021-07-06T06:32:25.7098316Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.7098869Z elif t == 'default':
2021-07-06T06:32:25.7099275Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.7100677Z # workqueue
2021-07-06T06:32:25.7101044Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.7101393Z if not lib:
2021-07-06T06:32:25.7101727Z # set requirements for hinting
2021-07-06T06:32:25.7102329Z requirements.append('TBB')
2021-07-06T06:32:25.7102687Z if _IS_OSX:
2021-07-06T06:32:25.7103200Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7103532Z else:
2021-07-06T06:32:25.7104067Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.7104462Z raise ValueError(msg % t)
2021-07-06T06:32:25.7105030Z
2021-07-06T06:32:25.7105288Z # No lib found, raise and hint
2021-07-06T06:32:25.7105604Z if not lib:
2021-07-06T06:32:25.7105922Z > raise_with_hint(requirements)
2021-07-06T06:32:25.7106095Z
2021-07-06T06:32:25.7106724Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.7107222Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7107444Z
2021-07-06T06:32:25.7107786Z required = ['TBB']
2021-07-06T06:32:25.7107912Z
2021-07-06T06:32:25.7108174Z def raise_with_hint(required):
2021-07-06T06:32:25.7108514Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.7108846Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.7109142Z if len(required) == 0:
2021-07-06T06:32:25.7109561Z hint = ''
2021-07-06T06:32:25.7109847Z if len(required) == 1:
2021-07-06T06:32:25.7110173Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.7110499Z if len(required) > 1:
2021-07-06T06:32:25.7111387Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.7115842Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.7116488Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.7118319Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.7118895Z E HINT:
2021-07-06T06:32:25.7124121Z E Intel TBB is required, try:
2021-07-06T06:32:25.7125311Z E $ conda/pip install tbb
2021-07-06T06:32:25.7125506Z
2021-07-06T06:32:25.7126186Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.7126506Z
2021-07-06T06:32:25.7128018Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.7128347Z
2021-07-06T06:32:25.7128642Z @pytest.fixture(scope="module")
2021-07-06T06:32:25.7128964Z def pbmc_scatterplots():
2021-07-06T06:32:25.7130164Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.7130558Z pbmc.layers["sparse"] = pbmc.raw.X / 2
2021-07-06T06:32:25.7130922Z pbmc.layers["test"] = pbmc.X.copy() + 100
2021-07-06T06:32:25.7131306Z pbmc.var["numbers"] = [str(x) for x in range(pbmc.shape[1])]
2021-07-06T06:32:25.7131666Z > sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.7131811Z
2021-07-06T06:32:25.7132379Z scanpy/tests/test_plotting.py:949:
2021-07-06T06:32:25.7132823Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7133440Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.7133812Z random_state=random_state,
2021-07-06T06:32:25.7134569Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.7134926Z self.n_neighbors,
2021-07-06T06:32:25.7135481Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.7135887Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.7136579Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.7137247Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.7138004Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.7138464Z raise e
2021-07-06T06:32:25.7139143Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.7139658Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.7140372Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.7143147Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.7143945Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.7144471Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.7145397Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.7146412Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.7147281Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.7147776Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.7148499Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.7148985Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.7150042Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.7150519Z return self._compile_bytecode()
2021-07-06T06:32:25.7151443Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.7151922Z return self._compile_core()
2021-07-06T06:32:25.7152630Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.7153069Z raise e
2021-07-06T06:32:25.7153743Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.7154200Z pm.run(self.state)
2021-07-06T06:32:25.7154893Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.7155362Z raise patched_exception
2021-07-06T06:32:25.7156073Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.7156716Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.7157780Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.7158258Z return func(*args, **kwargs)
2021-07-06T06:32:25.7158952Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.7159447Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.7160165Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.7160635Z mangled = func(compiler_state)
2021-07-06T06:32:25.7161314Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.7161779Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.7162459Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.7164779Z lower.lower()
2021-07-06T06:32:25.7165492Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.7165985Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.7166723Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.7167638Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.7168833Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.7169349Z self.lower_block(block)
2021-07-06T06:32:25.7170042Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.7170735Z self.lower_inst(inst)
2021-07-06T06:32:25.7171392Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.7171844Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.7172237Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7172802Z
2021-07-06T06:32:25.7175052Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.7176191Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.7177483Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.7178459Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.7180197Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.7181665Z tb = None
2021-07-06T06:32:25.7181801Z
2021-07-06T06:32:25.7182057Z @contextlib.contextmanager
2021-07-06T06:32:25.7182412Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.7182746Z """
2021-07-06T06:32:25.7183088Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.7183923Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.7184394Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.7185004Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.7185363Z constructor.
2021-07-06T06:32:25.7185604Z
2021-07-06T06:32:25.7185942Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.7186396Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.7186847Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.7187185Z """
2021-07-06T06:32:25.7187774Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.7188084Z
2021-07-06T06:32:25.7188513Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.7188936Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.7189351Z loc_info.update(kwargs)
2021-07-06T06:32:25.7189611Z
2021-07-06T06:32:25.7189840Z try:
2021-07-06T06:32:25.7190105Z yield
2021-07-06T06:32:25.7190393Z except NumbaError as e:
2021-07-06T06:32:25.7190756Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.7191986Z raise
2021-07-06T06:32:25.7192326Z except Exception as e:
2021-07-06T06:32:25.7192709Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.7193164Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.7193739Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.7194569Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.7195296Z E No threading layer could be loaded.
2021-07-06T06:32:25.7197156Z E HINT:
2021-07-06T06:32:25.7197897Z E Intel TBB is required, try:
2021-07-06T06:32:25.7198474Z E $ conda/pip install tbb
2021-07-06T06:32:25.7199177Z E 
2021-07-06T06:32:25.7201569Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.7202841Z E def compute_membership_strengths(
2021-07-06T06:32:25.7203403Z E <source elided>
2021-07-06T06:32:25.7203886Z E 
2021-07-06T06:32:25.7204612Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.7205139Z E ^
2021-07-06T06:32:25.7205565Z E 
2021-07-06T06:32:25.7207693Z E During: lowering "id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.7209185Z
2021-07-06T06:32:25.7210011Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.7210994Z ____________ ERROR at setup of test_scatterplots[umap_nocolor-umap] ____________
2021-07-06T06:32:25.7211260Z
2021-07-06T06:32:25.7211711Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.7213655Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.7215505Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.7217395Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.7218689Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.7219418Z tb = None
2021-07-06T06:32:25.7219532Z
2021-07-06T06:32:25.7219777Z @contextlib.contextmanager
2021-07-06T06:32:25.7220174Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.7220501Z """
2021-07-06T06:32:25.7220845Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.7221298Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.7221755Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.7222200Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.7222572Z constructor.
2021-07-06T06:32:25.7222971Z
2021-07-06T06:32:25.7223294Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.7223911Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.7224656Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.7225006Z """
2021-07-06T06:32:25.7225504Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.7225806Z
2021-07-06T06:32:25.7226211Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.7226801Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.7227212Z loc_info.update(kwargs)
2021-07-06T06:32:25.7227471Z
2021-07-06T06:32:25.7227705Z try:
2021-07-06T06:32:25.7227956Z > yield
2021-07-06T06:32:25.7228088Z
2021-07-06T06:32:25.7228701Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.7229397Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7229644Z
2021-07-06T06:32:25.7229932Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.7230821Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.7231096Z
2021-07-06T06:32:25.7231537Z def lower_block(self, block):
2021-07-06T06:32:25.7231831Z """
2021-07-06T06:32:25.7232094Z Lower the given block.
2021-07-06T06:32:25.7232361Z """
2021-07-06T06:32:25.7232620Z self.pre_block(block)
2021-07-06T06:32:25.7233073Z for inst in block.body:
2021-07-06T06:32:25.7233557Z self.loc = inst.loc
2021-07-06T06:32:25.7233905Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.7234532Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.7235171Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.7235575Z > self.lower_inst(inst)
2021-07-06T06:32:25.7236264Z
2021-07-06T06:32:25.7237227Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.7237743Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7237964Z
2021-07-06T06:32:25.7238250Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.7239301Z inst = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.7240030Z
2021-07-06T06:32:25.7240487Z def lower_inst(self, inst):
2021-07-06T06:32:25.7240841Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.7241235Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.7241572Z self.debug_print(str(inst))
2021-07-06T06:32:25.7242087Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.7242442Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.7242791Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.7243137Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.7243418Z
2021-07-06T06:32:25.7243868Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.7244216Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.7244547Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.7244865Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.7245134Z
2021-07-06T06:32:25.7245402Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.7245970Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.7246462Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.7246893Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.7247183Z
2021-07-06T06:32:25.7247466Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.7247845Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.7248179Z self.builder.branch(target)
2021-07-06T06:32:25.7248449Z
2021-07-06T06:32:25.7248735Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.7249097Z if self.generator_info:
2021-07-06T06:32:25.7249418Z # StopIteration
2021-07-06T06:32:25.7249754Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.7250087Z return
2021-07-06T06:32:25.7250395Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.7250757Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.7251085Z ty = self.fndesc.restype
2021-07-06T06:32:25.7251561Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.7251933Z # If returning an optional type
2021-07-06T06:32:25.7252350Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.7252717Z return
2021-07-06T06:32:25.7253017Z assert ty == oty, (
2021-07-06T06:32:25.7253617Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.7254089Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.7254502Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.7254804Z
2021-07-06T06:32:25.7255126Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.7255508Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7255869Z assert signature is not None
2021-07-06T06:32:25.7256164Z try:
2021-07-06T06:32:25.7256739Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.7257161Z except NotImplementedError:
2021-07-06T06:32:25.7257572Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.7258103Z inst.value, signature)
2021-07-06T06:32:25.7258460Z else:
2021-07-06T06:32:25.7258783Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.7259154Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.7259540Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.7259939Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.7260362Z signature.args[2])
2021-07-06T06:32:25.7260989Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.7261492Z
2021-07-06T06:32:25.7261776Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.7262295Z self.lower_print(inst)
2021-07-06T06:32:25.7262713Z
2021-07-06T06:32:25.7263019Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.7263394Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7263738Z assert signature is not None
2021-07-06T06:32:25.7264135Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.7264646Z signature)
2021-07-06T06:32:25.7264956Z
2021-07-06T06:32:25.7265248Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.7265635Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7265977Z assert signature is not None
2021-07-06T06:32:25.7266382Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.7266715Z
2021-07-06T06:32:25.7267020Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.7267387Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.7267750Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.7268049Z
2021-07-06T06:32:25.7268334Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.7268717Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.7269001Z
2021-07-06T06:32:25.7269299Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7269643Z assert signature is not None
2021-07-06T06:32:25.7269925Z
2021-07-06T06:32:25.7270178Z op = operator.delitem
2021-07-06T06:32:25.7270538Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.7270930Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.7271294Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.7271630Z )
2021-07-06T06:32:25.7271941Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.7272255Z
2021-07-06T06:32:25.7272635Z assert targetty == signature.args[0]
2021-07-06T06:32:25.7273033Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.7273434Z signature.args[1])
2021-07-06T06:32:25.7273744Z
2021-07-06T06:32:25.7274033Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.7274321Z
2021-07-06T06:32:25.7274619Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.7274953Z self.delvar(inst.value)
2021-07-06T06:32:25.7275230Z
2021-07-06T06:32:25.7275520Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.7275906Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.7276265Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.7276808Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7277082Z
2021-07-06T06:32:25.7277355Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.7277725Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.7278054Z assert signature is not None
2021-07-06T06:32:25.7278395Z assert signature.args[0] == targetty
2021-07-06T06:32:25.7278840Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.7279158Z
2021-07-06T06:32:25.7279414Z # Convert argument to match
2021-07-06T06:32:25.7279784Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.7280167Z signature.args[1])
2021-07-06T06:32:25.7280466Z
2021-07-06T06:32:25.7280745Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.7281025Z
2021-07-06T06:32:25.7281328Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.7284058Z self.lower_static_raise(inst)
2021-07-06T06:32:25.7284485Z
2021-07-06T06:32:25.7284806Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.7285736Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.7286033Z
2021-07-06T06:32:25.7286282Z else:
2021-07-06T06:32:25.7286632Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.7287059Z if isinstance(inst, _class):
2021-07-06T06:32:25.7288220Z > func(self, inst)
2021-07-06T06:32:25.7288403Z
2021-07-06T06:32:25.7289229Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.7290460Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7290736Z
2021-07-06T06:32:25.7291099Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.7292330Z parfor = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.7292916Z
2021-07-06T06:32:25.7293248Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.7293651Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.7294069Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.7294446Z The general approach is as follows:
2021-07-06T06:32:25.7295809Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.7296268Z in the context of the current function.
2021-07-06T06:32:25.7296690Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.7297125Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.7297572Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.7297996Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.7298442Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.7299011Z the final reduction values.
2021-07-06T06:32:25.7299288Z """
2021-07-06T06:32:25.7299622Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.7299932Z
2021-07-06T06:32:25.7300206Z ensure_parallel_support()
2021-07-06T06:32:25.7300535Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.7300888Z targetctx = lowerer.context
2021-07-06T06:32:25.7301512Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.7302316Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.7303748Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.7304206Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.7304776Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.7305164Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7305568Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.7305952Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.7307094Z varmap = lowerer.varmap
2021-07-06T06:32:25.7307434Z
2021-07-06T06:32:25.7307734Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7308073Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.7308399Z parfor.dump()
2021-07-06T06:32:25.7308644Z
2021-07-06T06:32:25.7308917Z loc = parfor.init_block.loc
2021-07-06T06:32:25.7309234Z scope = parfor.init_block.scope
2021-07-06T06:32:25.7309499Z
2021-07-06T06:32:25.7309791Z # produce instructions for init_block
2021-07-06T06:32:25.7310134Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7310554Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.7310980Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.7312041Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7312444Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.7312811Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.7313080Z
2021-07-06T06:32:25.7314043Z for racevar in parfor.races:
2021-07-06T06:32:25.7314494Z if racevar not in varmap:
2021-07-06T06:32:25.7314832Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.7315190Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.7315546Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.7315851Z
2021-07-06T06:32:25.7316089Z alias_map = {}
2021-07-06T06:32:25.7316379Z arg_aliases = {}
2021-07-06T06:32:25.7316758Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.7317251Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.7317655Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7318003Z print("alias_map", alias_map)
2021-07-06T06:32:25.7318356Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.7318632Z
2021-07-06T06:32:25.7318996Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.7319460Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.7319866Z assert parfor.params is not None
2021-07-06T06:32:25.7320344Z
2021-07-06T06:32:25.7320664Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.7321019Z parfor, parfor.params)
2021-07-06T06:32:25.7321404Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.7321844Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.7322237Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7322594Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.7323147Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.7323459Z
2021-07-06T06:32:25.7326331Z # init reduction array allocation here.
2021-07-06T06:32:25.7326818Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.7327111Z redarrs = {}
2021-07-06T06:32:25.7327410Z if nredvars > 0:
2021-07-06T06:32:25.7327768Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.7328167Z thread_count = get_thread_count()
2021-07-06T06:32:25.7328507Z scope = parfor.init_block.scope
2021-07-06T06:32:25.7328984Z loc = parfor.init_block.loc
2021-07-06T06:32:25.7329376Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.7329695Z
2021-07-06T06:32:25.7330148Z # For each reduction variable...
2021-07-06T06:32:25.7330649Z for i in range(nredvars):
2021-07-06T06:32:25.7331930Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.7332760Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.7333239Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.7333784Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.7334164Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7334610Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.7334992Z
2021-07-06T06:32:25.7335280Z # If this is reduction over an array,
2021-07-06T06:32:25.7336027Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.7336530Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.7336947Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.7337289Z else:
2021-07-06T06:32:25.7337584Z redarrdim = 1
2021-07-06T06:32:25.7337867Z
2021-07-06T06:32:25.7339599Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.7340016Z
2021-07-06T06:32:25.7340333Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.7340743Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.7341090Z fobj=np.empty,
2021-07-06T06:32:25.7341424Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.7341769Z args=(
2021-07-06T06:32:25.7342107Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.7342496Z types.DType(reddtype),
2021-07-06T06:32:25.7342802Z ),
2021-07-06T06:32:25.7343080Z )
2021-07-06T06:32:25.7343310Z
2021-07-06T06:32:25.7343687Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.7344149Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.7344850Z cval=thread_count,
2021-07-06T06:32:25.7345191Z typ=types.intp,
2021-07-06T06:32:25.7347490Z name='num_threads',
2021-07-06T06:32:25.7347829Z )
2021-07-06T06:32:25.7348059Z
2021-07-06T06:32:25.7348355Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.7348638Z
2021-07-06T06:32:25.7348952Z # If this is a reduction over an array...
2021-07-06T06:32:25.7349378Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.7349859Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.7350266Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.7350648Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.7351086Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.7351641Z name="redarr_shape",
2021-07-06T06:32:25.7351966Z )
2021-07-06T06:32:25.7352201Z
2021-07-06T06:32:25.7352610Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.7353522Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.7353960Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.7354372Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.7354793Z typ=types.intp,
2021-07-06T06:32:25.7355141Z name="redshapeonedim",
2021-07-06T06:32:25.7355475Z )
2021-07-06T06:32:25.7355801Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.7356095Z
2021-07-06T06:32:25.7356487Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.7356955Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.7357640Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.7359801Z )
2021-07-06T06:32:25.7360066Z
2021-07-06T06:32:25.7360371Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.7360959Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.7361268Z
2021-07-06T06:32:25.7361745Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.7362123Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.7362459Z )
2021-07-06T06:32:25.7362707Z
2021-07-06T06:32:25.7364172Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.7365358Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.7365664Z
2021-07-06T06:32:25.7365999Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.7366382Z if init_val is not None:
2021-07-06T06:32:25.7366825Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.7367299Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.7367740Z # First, create a variable for np.full.
2021-07-06T06:32:25.7368148Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.7368536Z fobj=np.full,
2021-07-06T06:32:25.7368896Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.7369244Z args=(
2021-07-06T06:32:25.7369633Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.7371017Z reddtype,
2021-07-06T06:32:25.7371579Z types.DType(reddtype),
2021-07-06T06:32:25.7371914Z ),
2021-07-06T06:32:25.7372208Z )
2021-07-06T06:32:25.7372442Z
2021-07-06T06:32:25.7372932Z # Then create a var with the identify value.
2021-07-06T06:32:25.7373349Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.7374096Z cval=init_val,
2021-07-06T06:32:25.7374506Z typ=reddtype,
2021-07-06T06:32:25.7374839Z name="init_val",
2021-07-06T06:32:25.7375166Z )
2021-07-06T06:32:25.7375408Z
2021-07-06T06:32:25.7375799Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.7376249Z full_call = pfbdr.call(
2021-07-06T06:32:25.7377075Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.7377460Z )
2021-07-06T06:32:25.7377889Z
2021-07-06T06:32:25.7378931Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.7379313Z rhs=full_call,
2021-07-06T06:32:25.7379661Z typ=redvar_typ,
2021-07-06T06:32:25.7379999Z name="redtoset",
2021-07-06T06:32:25.7380329Z )
2021-07-06T06:32:25.7382256Z else:
2021-07-06T06:32:25.7382680Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.7383045Z cval=init_val,
2021-07-06T06:32:25.7383393Z typ=reddtype,
2021-07-06T06:32:25.7383725Z name="redtoset",
2021-07-06T06:32:25.7384053Z )
2021-07-06T06:32:25.7384334Z else:
2021-07-06T06:32:25.7384755Z redtoset = redvar
2021-07-06T06:32:25.7385046Z
2021-07-06T06:32:25.7385364Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.7385881Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.7386372Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.7386869Z
2021-07-06T06:32:25.7387322Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.7387692Z cval=res_print_str,
2021-07-06T06:32:25.7388022Z typ=strconsttyp,
2021-07-06T06:32:25.7388367Z name="str_const",
2021-07-06T06:32:25.7388666Z )
2021-07-06T06:32:25.7388899Z
2021-07-06T06:32:25.7389213Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.7389792Z vararg=None, loc=loc)
2021-07-06T06:32:25.7390244Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.7390707Z typemap[lhs.name],
2021-07-06T06:32:25.7391198Z typemap[redvar.name])
2021-07-06T06:32:25.7391635Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.7392029Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.7392319Z
2021-07-06T06:32:25.7392542Z
2021-07-06T06:32:25.7393288Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.7393806Z for j in range(thread_count):
2021-07-06T06:32:25.7394193Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.7394590Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.7394947Z )
2021-07-06T06:32:25.7395305Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.7395655Z
2021-07-06T06:32:25.7395992Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.7396407Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.7396919Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.7397546Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.7398193Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.7398633Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.7399021Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.7399410Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.7399798Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.7400125Z try:
2021-07-06T06:32:25.7400543Z (func,
2021-07-06T06:32:25.7400788Z func_args,
2021-07-06T06:32:25.7401056Z func_sig,
2021-07-06T06:32:25.7401428Z redargstartdim,
2021-07-06T06:32:25.7401712Z func_arg_types,
2021-07-06T06:32:25.7402038Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.7402462Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.7403041Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.7403374Z finally:
2021-07-06T06:32:25.7403882Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.7404193Z
2021-07-06T06:32:25.7404470Z # get the shape signature
2021-07-06T06:32:25.7405143Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.7405710Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.7406261Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.7406664Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7406981Z print("func_args = ", func_args)
2021-07-06T06:32:25.7407501Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.7407855Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.7408334Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.7408863Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.7409373Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.7410459Z parfor.get_shape_classes,
2021-07-06T06:32:25.7410751Z num_inputs,
2021-07-06T06:32:25.7411042Z num_reductions,
2021-07-06T06:32:25.7411310Z func_args,
2021-07-06T06:32:25.7411595Z redargstartdim,
2021-07-06T06:32:25.7411861Z func_sig,
2021-07-06T06:32:25.7412138Z parfor.races,
2021-07-06T06:32:25.7412578Z typemap)
2021-07-06T06:32:25.7412881Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7413604Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.7413978Z
2021-07-06T06:32:25.7415362Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.7415848Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.7416276Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7416630Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.7417009Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.7417330Z call_parallel_gufunc(
2021-07-06T06:32:25.7417623Z lowerer,
2021-07-06T06:32:25.7417882Z func,
2021-07-06T06:32:25.7418143Z gu_signature,
2021-07-06T06:32:25.7418430Z func_sig,
2021-07-06T06:32:25.7418694Z func_args,
2021-07-06T06:32:25.7418988Z func_arg_types,
2021-07-06T06:32:25.7419637Z loop_ranges,
2021-07-06T06:32:25.7420085Z parfor_redvars,
2021-07-06T06:32:25.7420540Z parfor_reddict,
2021-07-06T06:32:25.7420810Z redarrs,
2021-07-06T06:32:25.7421110Z parfor.init_block,
2021-07-06T06:32:25.7421397Z index_var_typ,
2021-07-06T06:32:25.7421691Z parfor.races,
2021-07-06T06:32:25.7421988Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.7422142Z
2021-07-06T06:32:25.7422934Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.7423490Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7423917Z
2021-07-06T06:32:25.7424383Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.7425396Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16a86e8e10>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.7426569Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.7427492Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.7428107Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.7428597Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.7428986Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.7429647Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.7430167Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.7430373Z
2021-07-06T06:32:25.7430736Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.7431258Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.7431753Z exp_name_to_tuple_var):
2021-07-06T06:32:25.7432222Z '''
2021-07-06T06:32:25.7432559Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.7433050Z '''
2021-07-06T06:32:25.7433328Z context = lowerer.context
2021-07-06T06:32:25.7433763Z builder = lowerer.builder
2021-07-06T06:32:25.7434020Z
2021-07-06T06:32:25.7434345Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.7435414Z get_thread_count,
2021-07-06T06:32:25.7435870Z _launch_threads)
2021-07-06T06:32:25.7436152Z
2021-07-06T06:32:25.7436429Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7436782Z print("make_parallel_loop")
2021-07-06T06:32:25.7437158Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.7437571Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.7438310Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.7438817Z print("expr_args", expr_args)
2021-07-06T06:32:25.7439162Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.7439518Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.7439788Z
2021-07-06T06:32:25.7440065Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.7440417Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.7440825Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.7441197Z sin, sout = gu_signature
2021-07-06T06:32:25.7441630Z
2021-07-06T06:32:25.7442132Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.7442488Z > _launch_threads()
2021-07-06T06:32:25.7442976Z
2021-07-06T06:32:25.7443712Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.7444247Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7444495Z
2021-07-06T06:32:25.7444738Z def _launch_threads():
2021-07-06T06:32:25.7445085Z if not _backend_init_process_lock:
2021-07-06T06:32:25.7445421Z _set_init_process_lock()
2021-07-06T06:32:25.7445677Z
2021-07-06T06:32:25.7445969Z with _backend_init_process_lock:
2021-07-06T06:32:25.7446502Z with _backend_init_thread_lock:
2021-07-06T06:32:25.7447013Z global _is_initialized
2021-07-06T06:32:25.7447509Z if _is_initialized:
2021-07-06T06:32:25.7448161Z return
2021-07-06T06:32:25.7448406Z
2021-07-06T06:32:25.7448728Z def select_known_backend(backend):
2021-07-06T06:32:25.7449068Z """
2021-07-06T06:32:25.7449425Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.7449802Z """
2021-07-06T06:32:25.7450082Z lib = None
2021-07-06T06:32:25.7450444Z if backend.startswith("tbb"):
2021-07-06T06:32:25.7450986Z try:
2021-07-06T06:32:25.7451374Z # check if TBB is present and compatible
2021-07-06T06:32:25.7451783Z _check_tbb_version_compatible()
2021-07-06T06:32:25.7452189Z # now try and load the backend
2021-07-06T06:32:25.7452591Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.7453008Z except ImportError:
2021-07-06T06:32:25.7453349Z pass
2021-07-06T06:32:25.7453702Z elif backend.startswith("omp"):
2021-07-06T06:32:25.7454163Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.7454607Z # that understands GNU OMP might be present
2021-07-06T06:32:25.7454992Z try:
2021-07-06T06:32:25.7455357Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.7455778Z except ImportError:
2021-07-06T06:32:25.7456118Z pass
2021-07-06T06:32:25.7456502Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.7457007Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.7457384Z else:
2021-07-06T06:32:25.7457798Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.7458265Z raise ValueError(msg % backend)
2021-07-06T06:32:25.7458601Z return lib
2021-07-06T06:32:25.7458852Z
2021-07-06T06:32:25.7459178Z def select_from_backends(backends):
2021-07-06T06:32:25.7459520Z """
2021-07-06T06:32:25.7459900Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.7460266Z """
2021-07-06T06:32:25.7460565Z lib = None
2021-07-06T06:32:25.7460909Z for backend in backends:
2021-07-06T06:32:25.7461310Z lib = select_known_backend(backend)
2021-07-06T06:32:25.7462147Z if lib is not None:
2021-07-06T06:32:25.7462530Z break
2021-07-06T06:32:25.7462835Z else:
2021-07-06T06:32:25.7463414Z backend = ''
2021-07-06T06:32:25.7463770Z return lib, backend
2021-07-06T06:32:25.7464037Z
2021-07-06T06:32:25.7464345Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.7465081Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.7465421Z
2021-07-06T06:32:25.7465666Z lib = None
2021-07-06T06:32:25.7465979Z err_helpers = dict()
2021-07-06T06:32:25.7466569Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.7467027Z "$ conda/pip install tbb")
2021-07-06T06:32:25.7467722Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.7468408Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.7468819Z requirements = []
2021-07-06T06:32:25.7469076Z
2021-07-06T06:32:25.7469392Z def raise_with_hint(required):
2021-07-06T06:32:25.7469801Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.7470212Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.7470582Z if len(required) == 0:
2021-07-06T06:32:25.7471100Z hint = ''
2021-07-06T06:32:25.7471452Z if len(required) == 1:
2021-07-06T06:32:25.7471842Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.7472251Z if len(required) > 1:
2021-07-06T06:32:25.7472868Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.7479127Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.7479563Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.7479886Z
2021-07-06T06:32:25.7480323Z if t in namedbackends:
2021-07-06T06:32:25.7482381Z # Try and load the specific named backend
2021-07-06T06:32:25.7482753Z lib = select_known_backend(t)
2021-07-06T06:32:25.7483104Z if not lib:
2021-07-06T06:32:25.7483666Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.7484271Z # loading, set requirements for hinting
2021-07-06T06:32:25.7485413Z if t == 'tbb':
2021-07-06T06:32:25.7485985Z requirements.append('TBB')
2021-07-06T06:32:25.7486565Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.7487560Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7488018Z libname = t
2021-07-06T06:32:25.7488966Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.7489801Z # User wants a specific behaviour...
2021-07-06T06:32:25.7490327Z available = ['tbb']
2021-07-06T06:32:25.7490835Z requirements.append('TBB')
2021-07-06T06:32:25.7491362Z if t == "safe":
2021-07-06T06:32:25.7491785Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.7492160Z pass
2021-07-06T06:32:25.7492511Z elif t == "threadsafe":
2021-07-06T06:32:25.7492877Z if _IS_OSX:
2021-07-06T06:32:25.7493426Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7493836Z # omp is threadsafe everywhere
2021-07-06T06:32:25.7494362Z available.append('omp')
2021-07-06T06:32:25.7494760Z elif t == "forksafe":
2021-07-06T06:32:25.7495181Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.7495676Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.7496078Z # this to workqueue
2021-07-06T06:32:25.7496449Z if not _IS_LINUX:
2021-07-06T06:32:25.7496991Z available.append('omp')
2021-07-06T06:32:25.7497376Z if _IS_OSX:
2021-07-06T06:32:25.7498128Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7498528Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.7499057Z available.append('workqueue')
2021-07-06T06:32:25.7499415Z else: # unreachable
2021-07-06T06:32:25.7499815Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.7500205Z raise ValueError(msg % t)
2021-07-06T06:32:25.7500565Z # select amongst available
2021-07-06T06:32:25.7500931Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.7501473Z elif t == 'default':
2021-07-06T06:32:25.7501863Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.7502237Z # workqueue
2021-07-06T06:32:25.7502584Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.7502962Z if not lib:
2021-07-06T06:32:25.7503301Z # set requirements for hinting
2021-07-06T06:32:25.7504040Z requirements.append('TBB')
2021-07-06T06:32:25.7505272Z if _IS_OSX:
2021-07-06T06:32:25.7505975Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7506360Z else:
2021-07-06T06:32:25.7507139Z msg = "The threading layer requested '%s' is unknown to Numba."
2021-07-06T06:32:25.7508274Z raise ValueError(msg % t)
2021-07-06T06:32:25.7508599Z
2021-07-06T06:32:25.7509812Z # No lib found, raise and hint
2021-07-06T06:32:25.7510331Z if not lib:
2021-07-06T06:32:25.7510693Z > raise_with_hint(requirements)
2021-07-06T06:32:25.7510874Z
2021-07-06T06:32:25.7511849Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:499:
2021-07-06T06:32:25.7512389Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7512611Z
2021-07-06T06:32:25.7513771Z required = ['TBB']
2021-07-06T06:32:25.7513981Z
2021-07-06T06:32:25.7514277Z def raise_with_hint(required):
2021-07-06T06:32:25.7514627Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.7514989Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.7517830Z if len(required) == 0:
2021-07-06T06:32:25.7518432Z hint = ''
2021-07-06T06:32:25.7518742Z if len(required) == 1:
2021-07-06T06:32:25.7519291Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.7519638Z if len(required) > 1:
2021-07-06T06:32:25.7520248Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.7520685Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.7521482Z > raise ValueError(errmsg % hint)
2021-07-06T06:32:25.7522241Z E ValueError: No threading layer could be loaded.
2021-07-06T06:32:25.7522781Z E HINT:
2021-07-06T06:32:25.7524156Z E Intel TBB is required, try:
2021-07-06T06:32:25.7524734Z E $ conda/pip install tbb
2021-07-06T06:32:25.7524937Z
2021-07-06T06:32:25.7525591Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/np/ufunc/parallel.py:444: ValueError
2021-07-06T06:32:25.7525924Z
2021-07-06T06:32:25.7526498Z During handling of the above exception, another exception occurred:
2021-07-06T06:32:25.7526772Z
2021-07-06T06:32:25.7527032Z @pytest.fixture(scope="module")
2021-07-06T06:32:25.7527366Z def pbmc_scatterplots():
2021-07-06T06:32:25.7527695Z pbmc = sc.datasets.pbmc68k_reduced()
2021-07-06T06:32:25.7528058Z pbmc.layers["sparse"] = pbmc.raw.X / 2
2021-07-06T06:32:25.7528408Z pbmc.layers["test"] = pbmc.X.copy() + 100
2021-07-06T06:32:25.7528809Z pbmc.var["numbers"] = [str(x) for x in range(pbmc.shape[1])]
2021-07-06T06:32:25.7529165Z > sc.pp.neighbors(pbmc)
2021-07-06T06:32:25.7529309Z
2021-07-06T06:32:25.7530617Z scanpy/tests/test_plotting.py:949:
2021-07-06T06:32:25.7531067Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7531711Z scanpy/neighbors/__init__.py:147: in neighbors
2021-07-06T06:32:25.7532089Z random_state=random_state,
2021-07-06T06:32:25.7532659Z scanpy/neighbors/__init__.py:812: in compute_neighbors
2021-07-06T06:32:25.7533029Z self.n_neighbors,
2021-07-06T06:32:25.7535284Z scanpy/neighbors/__init__.py:398: in _compute_connectivities_umap
2021-07-06T06:32:25.7535734Z local_connectivity=local_connectivity,
2021-07-06T06:32:25.7536447Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py:568: in fuzzy_simplicial_set
2021-07-06T06:32:25.7536972Z knn_indices, knn_dists, sigmas, rhos, return_dists
2021-07-06T06:32:25.7537728Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:439: in _compile_for_args
2021-07-06T06:32:25.7538200Z raise e
2021-07-06T06:32:25.7539018Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:372: in _compile_for_args
2021-07-06T06:32:25.7539707Z return_val = self.compile(tuple(argtypes))
2021-07-06T06:32:25.7540964Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:909: in compile
2021-07-06T06:32:25.7541493Z cres = self._compiler.compile(args, return_type)
2021-07-06T06:32:25.7542214Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:79: in compile
2021-07-06T06:32:25.7542745Z status, retval = self._compile_cached(args, return_type)
2021-07-06T06:32:25.7543499Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:93: in _compile_cached
2021-07-06T06:32:25.7544987Z retval = self._compile_core(args, return_type)
2021-07-06T06:32:25.7545852Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/dispatcher.py:111: in _compile_core
2021-07-06T06:32:25.7546366Z pipeline_class=self.pipeline_class)
2021-07-06T06:32:25.7547081Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:606: in compile_extra
2021-07-06T06:32:25.7547599Z return pipeline.compile_extra(func)
2021-07-06T06:32:25.7548501Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:353: in compile_extra
2021-07-06T06:32:25.7549001Z return self._compile_bytecode()
2021-07-06T06:32:25.7549713Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:415: in _compile_bytecode
2021-07-06T06:32:25.7550208Z return self._compile_core()
2021-07-06T06:32:25.7550903Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:395: in _compile_core
2021-07-06T06:32:25.7551357Z raise e
2021-07-06T06:32:25.7552019Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler.py:386: in _compile_core
2021-07-06T06:32:25.7552489Z pm.run(self.state)
2021-07-06T06:32:25.7553184Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:339: in run
2021-07-06T06:32:25.7553650Z raise patched_exception
2021-07-06T06:32:25.7554369Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:330: in run
2021-07-06T06:32:25.7556600Z self._runPass(idx, pass_inst, state)
2021-07-06T06:32:25.7557423Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_lock.py:35: in _acquire_compile_lock
2021-07-06T06:32:25.7557917Z return func(*args, **kwargs)
2021-07-06T06:32:25.7558650Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:289: in _runPass
2021-07-06T06:32:25.7559163Z mutated |= check(pss.run_pass, internal_state)
2021-07-06T06:32:25.7559916Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/compiler_machinery.py:262: in check
2021-07-06T06:32:25.7560406Z mangled = func(compiler_state)
2021-07-06T06:32:25.7561125Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:463: in run_pass
2021-07-06T06:32:25.7561608Z NativeLowering().run_pass(state)
2021-07-06T06:32:25.7562327Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/typed_passes.py:384: in run_pass
2021-07-06T06:32:25.7562774Z lower.lower()
2021-07-06T06:32:25.7563446Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:136: in lower
2021-07-06T06:32:25.7563923Z self.lower_normal_function(self.fndesc)
2021-07-06T06:32:25.7564677Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:190: in lower_normal_function
2021-07-06T06:32:25.7565188Z entry_block_tail = self.lower_function_body()
2021-07-06T06:32:25.7565940Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:216: in lower_function_body
2021-07-06T06:32:25.7566877Z self.lower_block(block)
2021-07-06T06:32:25.7568624Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230: in lower_block
2021-07-06T06:32:25.7569150Z self.lower_inst(inst)
2021-07-06T06:32:25.7570218Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/contextlib.py:130: in __exit__
2021-07-06T06:32:25.7570648Z self.gen.throw(type, value, traceback)
2021-07-06T06:32:25.7571238Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7571471Z
2021-07-06T06:32:25.7571891Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.7572931Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.7574130Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.7575772Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.7576958Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.7577885Z tb = None
2021-07-06T06:32:25.7577999Z
2021-07-06T06:32:25.7578242Z @contextlib.contextmanager
2021-07-06T06:32:25.7578609Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.7578930Z """
2021-07-06T06:32:25.7579289Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.7579750Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.7580216Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.7581065Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.7581852Z constructor.
2021-07-06T06:32:25.7582072Z
2021-07-06T06:32:25.7582396Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.7583012Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.7583455Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.7583958Z """
2021-07-06T06:32:25.7584797Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.7585146Z
2021-07-06T06:32:25.7585602Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.7586043Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.7586463Z loc_info.update(kwargs)
2021-07-06T06:32:25.7586741Z
2021-07-06T06:32:25.7586969Z try:
2021-07-06T06:32:25.7587241Z yield
2021-07-06T06:32:25.7587532Z except NumbaError as e:
2021-07-06T06:32:25.7587887Z e.add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.7588224Z raise
2021-07-06T06:32:25.7588509Z except Exception as e:
2021-07-06T06:32:25.7588910Z newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
2021-07-06T06:32:25.7589361Z tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
2021-07-06T06:32:25.7589979Z > raise newerr.with_traceback(tb)
2021-07-06T06:32:25.7591685Z E numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
2021-07-06T06:32:25.7592585Z E No threading layer could be loaded.
2021-07-06T06:32:25.7593291Z E HINT:
2021-07-06T06:32:25.7593836Z E Intel TBB is required, try:
2021-07-06T06:32:25.7594377Z E $ conda/pip install tbb
2021-07-06T06:32:25.7594855Z E 
2021-07-06T06:32:25.7596343Z E File "../../../../../opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py", line 404:
2021-07-06T06:32:25.7597553Z E def compute_membership_strengths(
2021-07-06T06:32:25.7598131Z E <source elided>
2021-07-06T06:32:25.7598592Z E 
2021-07-06T06:32:25.7599320Z E rows = np.zeros(knn_indices.size, dtype=np.int32)
2021-07-06T06:32:25.7600545Z E ^
2021-07-06T06:32:25.7601042Z E 
2021-07-06T06:32:25.7602420Z E During: lowering "id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)
2021-07-06T06:32:25.7605538Z
2021-07-06T06:32:25.7606473Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:751: LoweringError
2021-07-06T06:32:25.7607430Z ________________ ERROR at setup of test_scatterplots[umap-fn8] _________________
2021-07-06T06:32:25.7607683Z
2021-07-06T06:32:25.7608106Z fmt_ = 'lowering "{inst}" at {loc}', args = ()
2021-07-06T06:32:25.7609183Z kwargs = {'inst': id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/h...c': Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)}
2021-07-06T06:32:25.7610655Z errcls = functools.partial(<class 'numba.core.errors.LoweringError'>, loc=Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None))
2021-07-06T06:32:25.7612039Z loc = Loc(filename=/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py, line=404, col=None)
2021-07-06T06:32:25.7613831Z newerr = LoweringError('Failed in nopython mode pipeline (step: nopython mode backend)\nNo threading layer could be loaded.\nHI..._index.5036, umap_.py:404)" at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)')
2021-07-06T06:32:25.7614628Z tb = None
2021-07-06T06:32:25.7614742Z
2021-07-06T06:32:25.7615009Z @contextlib.contextmanager
2021-07-06T06:32:25.7615361Z def new_error_context(fmt_, *args, **kwargs):
2021-07-06T06:32:25.7615702Z """
2021-07-06T06:32:25.7616043Z A contextmanager that prepend contextual information to any exception
2021-07-06T06:32:25.7616972Z raised within. If the exception type is not an instance of NumbaError,
2021-07-06T06:32:25.7617546Z it will be wrapped into a InternalError. The exception class can be
2021-07-06T06:32:25.7618015Z changed by providing a "errcls_" keyword argument with the exception
2021-07-06T06:32:25.7618376Z constructor.
2021-07-06T06:32:25.7618629Z
2021-07-06T06:32:25.7618961Z The first argument is a message that describes the context. It can be a
2021-07-06T06:32:25.7619413Z format string. If there are additional arguments, it will be used as
2021-07-06T06:32:25.7619877Z ``fmt_.format(*args, **kwargs)`` to produce the final message string.
2021-07-06T06:32:25.7620216Z """
2021-07-06T06:32:25.7620817Z errcls = kwargs.pop('errcls_', InternalError)
2021-07-06T06:32:25.7621127Z
2021-07-06T06:32:25.7621568Z loc = kwargs.get('loc', None)
2021-07-06T06:32:25.7621988Z if loc is not None and not loc.filename.startswith(_numba_path):
2021-07-06T06:32:25.7622570Z loc_info.update(kwargs)
2021-07-06T06:32:25.7622981Z
2021-07-06T06:32:25.7623223Z try:
2021-07-06T06:32:25.7623467Z > yield
2021-07-06T06:32:25.7623589Z
2021-07-06T06:32:25.7624222Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/errors.py:744:
2021-07-06T06:32:25.7625070Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7625302Z
2021-07-06T06:32:25.7625611Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.7626333Z block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (401)>
2021-07-06T06:32:25.7626618Z
2021-07-06T06:32:25.7626908Z def lower_block(self, block):
2021-07-06T06:32:25.7627197Z """
2021-07-06T06:32:25.7627476Z Lower the given block.
2021-07-06T06:32:25.7627741Z """
2021-07-06T06:32:25.7628017Z self.pre_block(block)
2021-07-06T06:32:25.7628326Z for inst in block.body:
2021-07-06T06:32:25.7628662Z self.loc = inst.loc
2021-07-06T06:32:25.7629013Z defaulterrcls = partial(LoweringError, loc=self.loc)
2021-07-06T06:32:25.7629971Z with new_error_context('lowering "{inst}" at {loc}', inst=inst,
2021-07-06T06:32:25.7630741Z loc=self.loc, errcls_=defaulterrcls):
2021-07-06T06:32:25.7631318Z > self.lower_inst(inst)
2021-07-06T06:32:25.7631496Z
2021-07-06T06:32:25.7633101Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:230:
2021-07-06T06:32:25.7633708Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7633938Z
2021-07-06T06:32:25.7634229Z self = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.7635356Z inst = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.7636252Z
2021-07-06T06:32:25.7636579Z def lower_inst(self, inst):
2021-07-06T06:32:25.7636972Z # Set debug location for all subsequent LL instructions
2021-07-06T06:32:25.7637381Z self.debuginfo.mark_location(self.builder, self.loc)
2021-07-06T06:32:25.7637926Z self.debug_print(str(inst))
2021-07-06T06:32:25.7638252Z if isinstance(inst, ir.Assign):
2021-07-06T06:32:25.7638617Z ty = self.typeof(inst.target.name)
2021-07-06T06:32:25.7638948Z val = self.lower_assign(ty, inst)
2021-07-06T06:32:25.7639301Z self.storevar(val, inst.target.name)
2021-07-06T06:32:25.7639573Z
2021-07-06T06:32:25.7639851Z elif isinstance(inst, ir.Branch):
2021-07-06T06:32:25.7640218Z cond = self.loadvar(inst.cond.name)
2021-07-06T06:32:25.7640543Z tr = self.blkmap[inst.truebr]
2021-07-06T06:32:25.7640879Z fl = self.blkmap[inst.falsebr]
2021-07-06T06:32:25.7641144Z
2021-07-06T06:32:25.7641432Z condty = self.typeof(inst.cond.name)
2021-07-06T06:32:25.7641819Z pred = self.context.cast(self.builder, cond, condty, types.boolean)
2021-07-06T06:32:25.7642311Z assert pred.type == Type.int(1), ("cond is not i1: %s" % pred.type)
2021-07-06T06:32:25.7642727Z self.builder.cbranch(pred, tr, fl)
2021-07-06T06:32:25.7643010Z
2021-07-06T06:32:25.7643284Z elif isinstance(inst, ir.Jump):
2021-07-06T06:32:25.7643623Z target = self.blkmap[inst.target]
2021-07-06T06:32:25.7644149Z self.builder.branch(target)
2021-07-06T06:32:25.7644414Z
2021-07-06T06:32:25.7644721Z elif isinstance(inst, ir.Return):
2021-07-06T06:32:25.7645079Z if self.generator_info:
2021-07-06T06:32:25.7645419Z # StopIteration
2021-07-06T06:32:25.7645759Z self.genlower.return_from_generator(self)
2021-07-06T06:32:25.7646100Z return
2021-07-06T06:32:25.7646578Z val = self.loadvar(inst.value.name)
2021-07-06T06:32:25.7646944Z oty = self.typeof(inst.value.name)
2021-07-06T06:32:25.7647272Z ty = self.fndesc.restype
2021-07-06T06:32:25.7647814Z if isinstance(ty, types.Optional):
2021-07-06T06:32:25.7648190Z # If returning an optional type
2021-07-06T06:32:25.7648901Z self.call_conv.return_optional_value(self.builder, ty, oty, val)
2021-07-06T06:32:25.7649266Z return
2021-07-06T06:32:25.7649535Z assert ty == oty, (
2021-07-06T06:32:25.7650404Z "type '{}' does not match return type '{}'".format(oty, ty))
2021-07-06T06:32:25.7650860Z retval = self.context.get_return_value(self.builder, ty, val)
2021-07-06T06:32:25.7651294Z self.call_conv.return_value(self.builder, retval)
2021-07-06T06:32:25.7651599Z
2021-07-06T06:32:25.7651920Z elif isinstance(inst, ir.StaticSetItem):
2021-07-06T06:32:25.7652302Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7652654Z assert signature is not None
2021-07-06T06:32:25.7652965Z try:
2021-07-06T06:32:25.7653649Z impl = self.context.get_function('static_setitem', signature)
2021-07-06T06:32:25.7654544Z except NotImplementedError:
2021-07-06T06:32:25.7654968Z return self.lower_setitem(inst.target, inst.index_var,
2021-07-06T06:32:25.7655405Z inst.value, signature)
2021-07-06T06:32:25.7655741Z else:
2021-07-06T06:32:25.7656083Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.7656457Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.7656845Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.7657242Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.7657667Z signature.args[2])
2021-07-06T06:32:25.7658086Z return impl(self.builder, (target, inst.index, value))
2021-07-06T06:32:25.7658402Z
2021-07-06T06:32:25.7658707Z elif isinstance(inst, ir.Print):
2021-07-06T06:32:25.7659049Z self.lower_print(inst)
2021-07-06T06:32:25.7659322Z
2021-07-06T06:32:25.7659610Z elif isinstance(inst, ir.SetItem):
2021-07-06T06:32:25.7659996Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7660340Z assert signature is not None
2021-07-06T06:32:25.7660736Z return self.lower_setitem(inst.target, inst.index, inst.value,
2021-07-06T06:32:25.7661135Z signature)
2021-07-06T06:32:25.7661415Z
2021-07-06T06:32:25.7661727Z elif isinstance(inst, ir.StoreMap):
2021-07-06T06:32:25.7662096Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7662456Z assert signature is not None
2021-07-06T06:32:25.7662998Z return self.lower_setitem(inst.dct, inst.key, inst.value, signature)
2021-07-06T06:32:25.7663342Z
2021-07-06T06:32:25.7667022Z elif isinstance(inst, ir.DelItem):
2021-07-06T06:32:25.7667449Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.7667822Z index = self.loadvar(inst.index.name)
2021-07-06T06:32:25.7668123Z
2021-07-06T06:32:25.7668408Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.7668769Z indexty = self.typeof(inst.index.name)
2021-07-06T06:32:25.7669073Z
2021-07-06T06:32:25.7669517Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7669866Z assert signature is not None
2021-07-06T06:32:25.7670123Z
2021-07-06T06:32:25.7670386Z op = operator.delitem
2021-07-06T06:32:25.7670735Z fnop = self.context.typing_context.resolve_value_type(op)
2021-07-06T06:32:25.7671298Z callsig = fnop.get_call_type(
2021-07-06T06:32:25.7671664Z self.context.typing_context, signature.args, {},
2021-07-06T06:32:25.7672200Z )
2021-07-06T06:32:25.7672531Z impl = self.context.get_function(fnop, callsig)
2021-07-06T06:32:25.7672838Z
2021-07-06T06:32:25.7673134Z assert targetty == signature.args[0]
2021-07-06T06:32:25.7673515Z index = self.context.cast(self.builder, index, indexty,
2021-07-06T06:32:25.7673927Z signature.args[1])
2021-07-06T06:32:25.7674222Z
2021-07-06T06:32:25.7674530Z return impl(self.builder, (target, index))
2021-07-06T06:32:25.7674820Z
2021-07-06T06:32:25.7675119Z elif isinstance(inst, ir.Del):
2021-07-06T06:32:25.7675454Z self.delvar(inst.value)
2021-07-06T06:32:25.7675713Z
2021-07-06T06:32:25.7676022Z elif isinstance(inst, ir.SetAttr):
2021-07-06T06:32:25.7676426Z target = self.loadvar(inst.target.name)
2021-07-06T06:32:25.7677738Z value = self.loadvar(inst.value.name)
2021-07-06T06:32:25.7678127Z signature = self.fndesc.calltypes[inst]
2021-07-06T06:32:25.7678430Z
2021-07-06T06:32:25.7678716Z targetty = self.typeof(inst.target.name)
2021-07-06T06:32:25.7683846Z valuety = self.typeof(inst.value.name)
2021-07-06T06:32:25.7684237Z assert signature is not None
2021-07-06T06:32:25.7684579Z assert signature.args[0] == targetty
2021-07-06T06:32:25.7684977Z impl = self.context.get_setattr(inst.attr, signature)
2021-07-06T06:32:25.7685286Z
2021-07-06T06:32:25.7685766Z # Convert argument to match
2021-07-06T06:32:25.7686120Z value = self.context.cast(self.builder, value, valuety,
2021-07-06T06:32:25.7686518Z signature.args[1])
2021-07-06T06:32:25.7686801Z
2021-07-06T06:32:25.7687094Z return impl(self.builder, (target, value))
2021-07-06T06:32:25.7687373Z
2021-07-06T06:32:25.7687661Z elif isinstance(inst, ir.StaticRaise):
2021-07-06T06:32:25.7688041Z self.lower_static_raise(inst)
2021-07-06T06:32:25.7688303Z
2021-07-06T06:32:25.7688781Z elif isinstance(inst, ir.StaticTryRaise):
2021-07-06T06:32:25.7689489Z self.lower_static_try_raise(inst)
2021-07-06T06:32:25.7689780Z
2021-07-06T06:32:25.7690008Z else:
2021-07-06T06:32:25.7690372Z for _class, func in lower_extensions.items():
2021-07-06T06:32:25.7690782Z if isinstance(inst, _class):
2021-07-06T06:32:25.7691151Z > func(self, inst)
2021-07-06T06:32:25.7691309Z
2021-07-06T06:32:25.7692092Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/core/lowering.py:443:
2021-07-06T06:32:25.7692646Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7692874Z
2021-07-06T06:32:25.7693169Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.7694299Z parfor = id=88[LoopNest(index_variable = parfor_index.5036, range = (0, $28load_attr.11, 1))]{352: <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>}Var(parfor_index.5036, umap_.py:404)
2021-07-06T06:32:25.7694878Z
2021-07-06T06:32:25.7696001Z def _lower_parfor_parallel(lowerer, parfor):
2021-07-06T06:32:25.7698063Z """Lowerer that handles LLVM code generation for parfor.
2021-07-06T06:32:25.7698484Z This function lowers a parfor IR node to LLVM.
2021-07-06T06:32:25.7698887Z The general approach is as follows:
2021-07-06T06:32:25.7699601Z 1) The code from the parfor's init block is lowered normally
2021-07-06T06:32:25.7700030Z in the context of the current function.
2021-07-06T06:32:25.7700425Z 2) The body of the parfor is transformed into a gufunc function.
2021-07-06T06:32:25.7700878Z 3) Code is inserted into the main function that calls do_scheduling
2021-07-06T06:32:25.7701306Z to divide the iteration space for each thread, allocates
2021-07-06T06:32:25.7701921Z reduction arrays, calls the gufunc function, and then invokes
2021-07-06T06:32:25.7702350Z the reduction function across the reduction arrays to produce
2021-07-06T06:32:25.7702747Z the final reduction values.
2021-07-06T06:32:25.7703024Z """
2021-07-06T06:32:25.7703353Z from numba.np.ufunc.parallel import get_thread_count
2021-07-06T06:32:25.7703655Z
2021-07-06T06:32:25.7703911Z ensure_parallel_support()
2021-07-06T06:32:25.7704258Z typingctx = lowerer.context.typing_context
2021-07-06T06:32:25.7705475Z targetctx = lowerer.context
2021-07-06T06:32:25.7706231Z # We copy the typemap here because for race condition variable we'll
2021-07-06T06:32:25.7706695Z # update their type to array so they can be updated by the gufunc.
2021-07-06T06:32:25.7707107Z orig_typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.7707510Z # replace original typemap with copy and restore the original at the end.
2021-07-06T06:32:25.7707961Z lowerer.fndesc.typemap = copy.copy(orig_typemap)
2021-07-06T06:32:25.7708323Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7708897Z print("lowerer.fndesc", lowerer.fndesc, type(lowerer.fndesc))
2021-07-06T06:32:25.7709283Z typemap = lowerer.fndesc.typemap
2021-07-06T06:32:25.7709611Z varmap = lowerer.varmap
2021-07-06T06:32:25.7709866Z
2021-07-06T06:32:25.7710140Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7710497Z print("_lower_parfor_parallel")
2021-07-06T06:32:25.7710803Z parfor.dump()
2021-07-06T06:32:25.7711066Z
2021-07-06T06:32:25.7711324Z loc = parfor.init_block.loc
2021-07-06T06:32:25.7711660Z scope = parfor.init_block.scope
2021-07-06T06:32:25.7711925Z
2021-07-06T06:32:25.7712354Z # produce instructions for init_block
2021-07-06T06:32:25.7712701Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7713092Z print("init_block = ", parfor.init_block, " ", type(parfor.init_block))
2021-07-06T06:32:25.7713961Z for instr in parfor.init_block.body:
2021-07-06T06:32:25.7714321Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7714751Z print("lower init_block instr = ", instr)
2021-07-06T06:32:25.7716638Z lowerer.lower_inst(instr)
2021-07-06T06:32:25.7716923Z
2021-07-06T06:32:25.7718926Z for racevar in parfor.races:
2021-07-06T06:32:25.7720280Z if racevar not in varmap:
2021-07-06T06:32:25.7720625Z rvtyp = typemap[racevar]
2021-07-06T06:32:25.7720962Z rv = ir.Var(scope, racevar, loc)
2021-07-06T06:32:25.7721337Z lowerer._alloca_var(rv.name, rvtyp)
2021-07-06T06:32:25.7721624Z
2021-07-06T06:32:25.7721882Z alias_map = {}
2021-07-06T06:32:25.7722154Z arg_aliases = {}
2021-07-06T06:32:25.7722656Z numba.parfors.parfor.find_potential_aliases_parfor(parfor, parfor.params, typemap,
2021-07-06T06:32:25.7723838Z lowerer.func_ir, alias_map, arg_aliases)
2021-07-06T06:32:25.7724354Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7724707Z print("alias_map", alias_map)
2021-07-06T06:32:25.7725072Z print("arg_aliases", arg_aliases)
2021-07-06T06:32:25.7725348Z
2021-07-06T06:32:25.7725686Z # run get_parfor_outputs() and get_parfor_reductions() before gufunc creation
2021-07-06T06:32:25.7726167Z # since Jumps are modified so CFG of loop_body dict will become invalid
2021-07-06T06:32:25.7726555Z assert parfor.params is not None
2021-07-06T06:32:25.7726840Z
2021-07-06T06:32:25.7727156Z parfor_output_arrays = numba.parfors.parfor.get_parfor_outputs(
2021-07-06T06:32:25.7727540Z parfor, parfor.params)
2021-07-06T06:32:25.7728637Z parfor_redvars, parfor_reddict = numba.parfors.parfor.get_parfor_reductions(
2021-07-06T06:32:25.7729478Z lowerer.func_ir, parfor, parfor.params, lowerer.fndesc.calltypes)
2021-07-06T06:32:25.7730136Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7730528Z print("parfor_redvars:", parfor_redvars)
2021-07-06T06:32:25.7730936Z print("parfor_reddict:", parfor_reddict)
2021-07-06T06:32:25.7731261Z
2021-07-06T06:32:25.7731541Z # init reduction array allocation here.
2021-07-06T06:32:25.7731876Z nredvars = len(parfor_redvars)
2021-07-06T06:32:25.7732186Z redarrs = {}
2021-07-06T06:32:25.7732467Z if nredvars > 0:
2021-07-06T06:32:25.7732847Z # reduction arrays outer dimension equal to thread count
2021-07-06T06:32:25.7733225Z thread_count = get_thread_count()
2021-07-06T06:32:25.7733586Z scope = parfor.init_block.scope
2021-07-06T06:32:25.7733915Z loc = parfor.init_block.loc
2021-07-06T06:32:25.7734321Z pfbdr = ParforLoweringBuilder(lowerer=lowerer, scope=scope, loc=loc)
2021-07-06T06:32:25.7734814Z
2021-07-06T06:32:25.7735266Z # For each reduction variable...
2021-07-06T06:32:25.7735631Z for i in range(nredvars):
2021-07-06T06:32:25.7736018Z redvar_typ = lowerer.fndesc.typemap[parfor_redvars[i]]
2021-07-06T06:32:25.7736568Z redvar = ir.Var(scope, parfor_redvars[i], loc)
2021-07-06T06:32:25.7736971Z redarrvar_typ = redtyp_to_redarraytype(redvar_typ)
2021-07-06T06:32:25.7737369Z reddtype = redarrvar_typ.dtype
2021-07-06T06:32:25.7737728Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7738190Z print("redvar_typ", redvar_typ, redarrvar_typ, reddtype, types.DType(reddtype))
2021-07-06T06:32:25.7738556Z
2021-07-06T06:32:25.7738860Z # If this is reduction over an array,
2021-07-06T06:32:25.7739638Z # the reduction array has just one added per-worker dimension.
2021-07-06T06:32:25.7740139Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.7740565Z redarrdim = redvar_typ.ndim + 1
2021-07-06T06:32:25.7740890Z else:
2021-07-06T06:32:25.7741266Z redarrdim = 1
2021-07-06T06:32:25.7741527Z
2021-07-06T06:32:25.7741893Z # Reduction array is created and initialized to the initial reduction value.
2021-07-06T06:32:25.7742249Z
2021-07-06T06:32:25.7742571Z # First create a var for the numpy empty ufunc.
2021-07-06T06:32:25.7742964Z glbl_np_empty = pfbdr.bind_global_function(
2021-07-06T06:32:25.7743329Z fobj=np.empty,
2021-07-06T06:32:25.7743667Z ftype=get_np_ufunc_typ(np.empty),
2021-07-06T06:32:25.7744014Z args=(
2021-07-06T06:32:25.7744354Z types.UniTuple(types.intp, redarrdim),
2021-07-06T06:32:25.7744972Z types.DType(reddtype),
2021-07-06T06:32:25.7745300Z ),
2021-07-06T06:32:25.7745560Z )
2021-07-06T06:32:25.7745814Z
2021-07-06T06:32:25.7746175Z # Create var for outer dimension size of reduction array equal to number of threads.
2021-07-06T06:32:25.7746656Z num_threads_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.7747014Z cval=thread_count,
2021-07-06T06:32:25.7747346Z typ=types.intp,
2021-07-06T06:32:25.7747866Z name='num_threads',
2021-07-06T06:32:25.7748186Z )
2021-07-06T06:32:25.7748419Z
2021-07-06T06:32:25.7748698Z size_var_list = [num_threads_var]
2021-07-06T06:32:25.7748998Z
2021-07-06T06:32:25.7749293Z # If this is a reduction over an array...
2021-07-06T06:32:25.7751393Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.7751867Z # Add code to get the shape of the array being reduced over.
2021-07-06T06:32:25.7752292Z redshape_var = pfbdr.assign(
2021-07-06T06:32:25.7752811Z rhs=ir.Expr.getattr(redvar, "shape", loc),
2021-07-06T06:32:25.7753252Z typ=types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.7753644Z name="redarr_shape",
2021-07-06T06:32:25.7753965Z )
2021-07-06T06:32:25.7754202Z
2021-07-06T06:32:25.7754590Z # Add the dimension sizes of the array being reduced over to the tuple of sizes pass to empty.
2021-07-06T06:32:25.7755104Z for j in range(redvar_typ.ndim):
2021-07-06T06:32:25.7755491Z onedimvar = pfbdr.assign(
2021-07-06T06:32:25.7755920Z rhs=ir.Expr.static_getitem(redshape_var, j, None, loc),
2021-07-06T06:32:25.7756324Z typ=types.intp,
2021-07-06T06:32:25.7756688Z name="redshapeonedim",
2021-07-06T06:32:25.7757005Z )
2021-07-06T06:32:25.7757349Z size_var_list.append(onedimvar)
2021-07-06T06:32:25.7757646Z
2021-07-06T06:32:25.7758034Z # Empty call takes tuple of sizes. Create here and fill in outer dimension (num threads).
2021-07-06T06:32:25.7758584Z size_var = pfbdr.make_tuple_variable(
2021-07-06T06:32:25.7759756Z size_var_list, name='tuple_size_var',
2021-07-06T06:32:25.7760143Z )
2021-07-06T06:32:25.7760375Z
2021-07-06T06:32:25.7760699Z # Add call to empty passing the size var tuple.
2021-07-06T06:32:25.7761113Z empty_call = pfbdr.call(glbl_np_empty, args=[size_var])
2021-07-06T06:32:25.7761451Z
2021-07-06T06:32:25.7761719Z redarr_var = pfbdr.assign(
2021-07-06T06:32:25.7762116Z rhs=empty_call, typ=redarrvar_typ, name="redarr",
2021-07-06T06:32:25.7762454Z )
2021-07-06T06:32:25.7762699Z
2021-07-06T06:32:25.7763324Z # Remember mapping of original reduction array to the newly created per-worker reduction array.
2021-07-06T06:32:25.7763808Z redarrs[redvar.name] = redarr_var
2021-07-06T06:32:25.7764113Z
2021-07-06T06:32:25.7764420Z init_val = parfor_reddict[parfor_redvars[i]][0]
2021-07-06T06:32:25.7765129Z if init_val is not None:
2021-07-06T06:32:25.7766018Z if isinstance(redvar_typ, types.npytypes.Array):
2021-07-06T06:32:25.7766506Z # Create an array of identity values for the reduction.
2021-07-06T06:32:25.7766933Z # First, create a variable for np.full.
2021-07-06T06:32:25.7767362Z full_func_node = pfbdr.bind_global_function(
2021-07-06T06:32:25.7767736Z fobj=np.full,
2021-07-06T06:32:25.7768113Z ftype=get_np_ufunc_typ(np.full),
2021-07-06T06:32:25.7768813Z args=(
2021-07-06T06:32:25.7769286Z types.UniTuple(types.intp, redvar_typ.ndim),
2021-07-06T06:32:25.7769687Z reddtype,
2021-07-06T06:32:25.7770035Z types.DType(reddtype),
2021-07-06T06:32:25.7770393Z ),
2021-07-06T06:32:25.7770677Z )
2021-07-06T06:32:25.7770937Z
2021-07-06T06:32:25.7771249Z # Then create a var with the identify value.
2021-07-06T06:32:25.7771679Z init_val_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.7772050Z cval=init_val,
2021-07-06T06:32:25.7772397Z typ=reddtype,
2021-07-06T06:32:25.7772731Z name="init_val",
2021-07-06T06:32:25.7773054Z )
2021-07-06T06:32:25.7773297Z
2021-07-06T06:32:25.7773670Z # Then, call np.full with the shape of the reduction array and the identity value.
2021-07-06T06:32:25.7774140Z full_call = pfbdr.call(
2021-07-06T06:32:25.7774692Z full_func_node, args=[redshape_var, init_val_var],
2021-07-06T06:32:25.7775075Z )
2021-07-06T06:32:25.7775326Z
2021-07-06T06:32:25.7775624Z redtoset = pfbdr.assign(
2021-07-06T06:32:25.7775968Z rhs=full_call,
2021-07-06T06:32:25.7776317Z typ=redvar_typ,
2021-07-06T06:32:25.7776652Z name="redtoset",
2021-07-06T06:32:25.7776975Z )
2021-07-06T06:32:25.7777266Z else:
2021-07-06T06:32:25.7777612Z redtoset = pfbdr.make_const_variable(
2021-07-06T06:32:25.7777995Z cval=init_val,
2021-07-06T06:32:25.7778324Z typ=reddtype,
2021-07-06T06:32:25.7778677Z name="redtoset",
2021-07-06T06:32:25.7778984Z )
2021-07-06T06:32:25.7779288Z else:
2021-07-06T06:32:25.7779588Z redtoset = redvar
2021-07-06T06:32:25.7779867Z
2021-07-06T06:32:25.7780183Z if config.DEBUG_ARRAY_OPT_RUNTIME:
2021-07-06T06:32:25.7780755Z res_print_str = "res_print1 for redvar " + str(redvar) + ":"
2021-07-06T06:32:25.7781264Z strconsttyp = types.StringLiteral(res_print_str)
2021-07-06T06:32:25.7781583Z
2021-07-06T06:32:25.7781891Z lhs = pfbdr.make_const_variable(
2021-07-06T06:32:25.7782253Z cval=res_print_str,
2021-07-06T06:32:25.7782613Z typ=strconsttyp,
2021-07-06T06:32:25.7782952Z name="str_const",
2021-07-06T06:32:25.7783278Z )
2021-07-06T06:32:25.7783520Z
2021-07-06T06:32:25.7783841Z res_print = ir.Print(args=[lhs, redvar],
2021-07-06T06:32:25.7784248Z vararg=None, loc=loc)
2021-07-06T06:32:25.7784839Z lowerer.fndesc.calltypes[res_print] = signature(types.none,
2021-07-06T06:32:25.7785330Z typemap[lhs.name],
2021-07-06T06:32:25.7785806Z typemap[redvar.name])
2021-07-06T06:32:25.7786260Z print("res_print_redvar", res_print)
2021-07-06T06:32:25.7786639Z lowerer.lower_inst(res_print)
2021-07-06T06:32:25.7786945Z
2021-07-06T06:32:25.7787152Z
2021-07-06T06:32:25.7787897Z # For each thread, initialize the per-worker reduction array to the current reduction array value.
2021-07-06T06:32:25.7788400Z for j in range(thread_count):
2021-07-06T06:32:25.7788808Z index_var = pfbdr.make_const_variable(
2021-07-06T06:32:25.7790282Z cval=j, typ=types.uintp, name="index_var",
2021-07-06T06:32:25.7790694Z )
2021-07-06T06:32:25.7791055Z pfbdr.setitem(obj=redarr_var, index=index_var, val=redtoset)
2021-07-06T06:32:25.7791413Z
2021-07-06T06:32:25.7791748Z # compile parfor body as a separate function to be used with GUFuncWrapper
2021-07-06T06:32:25.7792140Z flags = copy.copy(parfor.flags)
2021-07-06T06:32:25.7792767Z flags.set('error_model', 'numpy')
2021-07-06T06:32:25.7793383Z # Can't get here unless flags.set('auto_parallel', ParallelOptions(True))
2021-07-06T06:32:25.7793866Z index_var_typ = typemap[parfor.loop_nests[0].index_variable.name]
2021-07-06T06:32:25.7794302Z # index variables should have the same type, check rest of indices
2021-07-06T06:32:25.7794719Z for l in parfor.loop_nests[1:]:
2021-07-06T06:32:25.7795108Z assert typemap[l.index_variable.name] == index_var_typ
2021-07-06T06:32:25.7795526Z numba.parfors.parfor.sequential_parfor_lowering = True
2021-07-06T06:32:25.7796069Z try:
2021-07-06T06:32:25.7796338Z (func,
2021-07-06T06:32:25.7796601Z func_args,
2021-07-06T06:32:25.7796871Z func_sig,
2021-07-06T06:32:25.7797175Z redargstartdim,
2021-07-06T06:32:25.7797492Z func_arg_types,
2021-07-06T06:32:25.7797860Z exp_name_to_tuple_var) = _create_gufunc_for_parfor_body(
2021-07-06T06:32:25.7798287Z lowerer, parfor, typemap, typingctx, targetctx, flags, {},
2021-07-06T06:32:25.7798720Z bool(alias_map), index_var_typ, parfor.races)
2021-07-06T06:32:25.7799049Z finally:
2021-07-06T06:32:25.7799404Z numba.parfors.parfor.sequential_parfor_lowering = False
2021-07-06T06:32:25.7799716Z
2021-07-06T06:32:25.7799990Z # get the shape signature
2021-07-06T06:32:25.7800510Z func_args = ['sched'] + func_args
2021-07-06T06:32:25.7800857Z num_reductions = len(parfor_redvars)
2021-07-06T06:32:25.7801474Z num_inputs = len(func_args) - len(parfor_output_arrays) - num_reductions
2021-07-06T06:32:25.7801890Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7802251Z print("func_args = ", func_args)
2021-07-06T06:32:25.7802701Z print("num_inputs = ", num_inputs)
2021-07-06T06:32:25.7803086Z print("parfor_outputs = ", parfor_output_arrays)
2021-07-06T06:32:25.7803468Z print("parfor_redvars = ", parfor_redvars)
2021-07-06T06:32:25.7803855Z print("num_reductions = ", num_reductions)
2021-07-06T06:32:25.7804215Z gu_signature = _create_shape_signature(
2021-07-06T06:32:25.7804569Z parfor.get_shape_classes,
2021-07-06T06:32:25.7804864Z num_inputs,
2021-07-06T06:32:25.7805141Z num_reductions,
2021-07-06T06:32:25.7805439Z func_args,
2021-07-06T06:32:25.7805713Z redargstartdim,
2021-07-06T06:32:25.7806004Z func_sig,
2021-07-06T06:32:25.7806274Z parfor.races,
2021-07-06T06:32:25.7806566Z typemap)
2021-07-06T06:32:25.7806866Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7807233Z print("gu_signature = ", gu_signature)
2021-07-06T06:32:25.7807525Z
2021-07-06T06:32:25.7808230Z # call the func in parallel by wrapping it with ParallelGUFuncBuilder
2021-07-06T06:32:25.7808775Z loop_ranges = [(l.start, l.stop, l.step) for l in parfor.loop_nests]
2021-07-06T06:32:25.7809170Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7809543Z print("loop_nests = ", parfor.loop_nests)
2021-07-06T06:32:25.7809903Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.7811019Z call_parallel_gufunc(
2021-07-06T06:32:25.7811484Z lowerer,
2021-07-06T06:32:25.7811756Z func,
2021-07-06T06:32:25.7812176Z gu_signature,
2021-07-06T06:32:25.7812446Z func_sig,
2021-07-06T06:32:25.7812732Z func_args,
2021-07-06T06:32:25.7813006Z func_arg_types,
2021-07-06T06:32:25.7813315Z loop_ranges,
2021-07-06T06:32:25.7813596Z parfor_redvars,
2021-07-06T06:32:25.7813899Z parfor_reddict,
2021-07-06T06:32:25.7814177Z redarrs,
2021-07-06T06:32:25.7814469Z parfor.init_block,
2021-07-06T06:32:25.7814757Z index_var_typ,
2021-07-06T06:32:25.7815036Z parfor.races,
2021-07-06T06:32:25.7815346Z > exp_name_to_tuple_var)
2021-07-06T06:32:25.7815502Z
2021-07-06T06:32:25.7816292Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:306:
2021-07-06T06:32:25.7818441Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7819372Z
2021-07-06T06:32:25.7819760Z lowerer = <numba.core.lowering.Lower object at 0x7f16ab1315d0>
2021-07-06T06:32:25.7820448Z cres = CompileResult(typing_context=<numba.core.typing.context.Context object at 0x7f16c9149250>, target_context=<numba.core....ollection object at 0x7f16a86e8e10>}, reload_init=[<function _reload_parfors at 0x7f16c92247a0>], referenced_envs=None)
2021-07-06T06:32:25.7821568Z gu_signature = ([('b',), ('a',)], [])
2021-07-06T06:32:25.7822139Z outer_sig = (array(uint64, 1d, C), array(int32, 1d, C)) -> none
2021-07-06T06:32:25.7822769Z expr_args = ['sched', 'rows'], expr_arg_types = [array(int32, 1d, C)]
2021-07-06T06:32:25.7823234Z loop_ranges = [(0, Var($28load_attr.11, umap_.py:404), 1)], redvars = []
2021-07-06T06:32:25.7823645Z reddict = {}, redarrdict = {}
2021-07-06T06:32:25.7824302Z init_block = <ir.Block at /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/umap/umap_.py (404)>
2021-07-06T06:32:25.7824974Z index_var_typ = uint64, races = set(), exp_name_to_tuple_var = {}
2021-07-06T06:32:25.7825184Z
2021-07-06T06:32:25.7825535Z def call_parallel_gufunc(lowerer, cres, gu_signature, outer_sig, expr_args, expr_arg_types,
2021-07-06T06:32:25.7826074Z loop_ranges, redvars, reddict, redarrdict, init_block, index_var_typ, races,
2021-07-06T06:32:25.7826560Z exp_name_to_tuple_var):
2021-07-06T06:32:25.7827068Z '''
2021-07-06T06:32:25.7827527Z Adds the call to the gufunc function from the main function.
2021-07-06T06:32:25.7829753Z '''
2021-07-06T06:32:25.7830097Z context = lowerer.context
2021-07-06T06:32:25.7830403Z builder = lowerer.builder
2021-07-06T06:32:25.7831040Z
2021-07-06T06:32:25.7831368Z from numba.np.ufunc.parallel import (build_gufunc_wrapper,
2021-07-06T06:32:25.7831773Z get_thread_count,
2021-07-06T06:32:25.7832470Z _launch_threads)
2021-07-06T06:32:25.7832850Z
2021-07-06T06:32:25.7833127Z if config.DEBUG_ARRAY_OPT:
2021-07-06T06:32:25.7833478Z print("make_parallel_loop")
2021-07-06T06:32:25.7833855Z print("outer_sig = ", outer_sig.args, outer_sig.return_type,
2021-07-06T06:32:25.7834251Z outer_sig.recvr, outer_sig.pysig)
2021-07-06T06:32:25.7834642Z print("loop_ranges = ", loop_ranges)
2021-07-06T06:32:25.7834981Z print("expr_args", expr_args)
2021-07-06T06:32:25.7835352Z print("expr_arg_types", expr_arg_types)
2021-07-06T06:32:25.7835706Z print("gu_signature", gu_signature)
2021-07-06T06:32:25.7836004Z
2021-07-06T06:32:25.7836268Z # Build the wrapper for GUFunc
2021-07-06T06:32:25.7836653Z args, return_type = sigutils.normalize_signature(outer_sig)
2021-07-06T06:32:25.7837078Z llvm_func = cres.library.get_function(cres.fndesc.llvm_func_name)
2021-07-06T06:32:25.7837463Z sin, sout = gu_signature
2021-07-06T06:32:25.7837719Z
2021-07-06T06:32:25.7838049Z # These are necessary for build_gufunc_wrapper to find external symbols
2021-07-06T06:32:25.7838438Z > _launch_threads()
2021-07-06T06:32:25.7838579Z
2021-07-06T06:32:25.7840114Z /opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/numba/parfors/parfor_lowering.py:1442:
2021-07-06T06:32:25.7840733Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2021-07-06T06:32:25.7840971Z
2021-07-06T06:32:25.7841243Z def _launch_threads():
2021-07-06T06:32:25.7841585Z if not _backend_init_process_lock:
2021-07-06T06:32:25.7841947Z _set_init_process_lock()
2021-07-06T06:32:25.7842211Z
2021-07-06T06:32:25.7842496Z with _backend_init_process_lock:
2021-07-06T06:32:25.7842887Z with _backend_init_thread_lock:
2021-07-06T06:32:25.7843389Z global _is_initialized
2021-07-06T06:32:25.7843730Z if _is_initialized:
2021-07-06T06:32:25.7844211Z return
2021-07-06T06:32:25.7844473Z
2021-07-06T06:32:25.7844780Z def select_known_backend(backend):
2021-07-06T06:32:25.7845141Z """
2021-07-06T06:32:25.7845498Z Loads a specific threading layer backend based on string
2021-07-06T06:32:25.7846043Z """
2021-07-06T06:32:25.7846324Z lib = None
2021-07-06T06:32:25.7846675Z if backend.startswith("tbb"):
2021-07-06T06:32:25.7847060Z try:
2021-07-06T06:32:25.7847428Z # check if TBB is present and compatible
2021-07-06T06:32:25.7847848Z _check_tbb_version_compatible()
2021-07-06T06:32:25.7848235Z # now try and load the backend
2021-07-06T06:32:25.7849032Z from numba.np.ufunc import tbbpool as lib
2021-07-06T06:32:25.7849511Z except ImportError:
2021-07-06T06:32:25.7849878Z pass
2021-07-06T06:32:25.7850235Z elif backend.startswith("omp"):
2021-07-06T06:32:25.7851312Z # TODO: Check that if MKL is present that it is a version
2021-07-06T06:32:25.7851947Z # that understands GNU OMP might be present
2021-07-06T06:32:25.7852343Z try:
2021-07-06T06:32:25.7852710Z from numba.np.ufunc import omppool as lib
2021-07-06T06:32:25.7853256Z except ImportError:
2021-07-06T06:32:25.7853841Z pass
2021-07-06T06:32:25.7854352Z elif backend.startswith("workqueue"):
2021-07-06T06:32:25.7854767Z from numba.np.ufunc import workqueue as lib
2021-07-06T06:32:25.7855099Z else:
2021-07-06T06:32:25.7855500Z msg = "Unknown value specified for threading layer: %s"
2021-07-06T06:32:25.7856106Z raise ValueError(msg % backend)
2021-07-06T06:32:25.7856701Z return lib
2021-07-06T06:32:25.7856953Z
2021-07-06T06:32:25.7857278Z def select_from_backends(backends):
2021-07-06T06:32:25.7857621Z """
2021-07-06T06:32:25.7857984Z Selects from presented backends and returns the first working
2021-07-06T06:32:25.7858374Z """
2021-07-06T06:32:25.7858654Z lib = None
2021-07-06T06:32:25.7859012Z for backend in backends:
2021-07-06T06:32:25.7859396Z lib = select_known_backend(backend)
2021-07-06T06:32:25.7859795Z if lib is not None:
2021-07-06T06:32:25.7860137Z break
2021-07-06T06:32:25.7860457Z else:
2021-07-06T06:32:25.7861037Z backend = ''
2021-07-06T06:32:25.7861424Z return lib, backend
2021-07-06T06:32:25.7861717Z
2021-07-06T06:32:25.7862411Z t = str(config.THREADING_LAYER).lower()
2021-07-06T06:32:25.7863008Z namedbackends = ['tbb', 'omp', 'workqueue']
2021-07-06T06:32:25.7863321Z
2021-07-06T06:32:25.7863584Z lib = None
2021-07-06T06:32:25.7863881Z err_helpers = dict()
2021-07-06T06:32:25.7864635Z err_helpers['TBB'] = ("Intel TBB is required, try:\n"
2021-07-06T06:32:25.7865110Z "$ conda/pip install tbb")
2021-07-06T06:32:25.7865821Z err_helpers['OSX_OMP'] = ("Intel OpenMP is required, try:\n"
2021-07-06T06:32:25.7866514Z "$ conda/pip install intel-openmp")
2021-07-06T06:32:25.7866903Z requirements = []
2021-07-06T06:32:25.7867178Z
2021-07-06T06:32:25.7867476Z def raise_with_hint(required):
2021-07-06T06:32:25.7867904Z errmsg = "No threading layer could be loaded.\n%s"
2021-07-06T06:32:25.7868303Z hintmsg = "HINT:\n%s"
2021-07-06T06:32:25.7868693Z if len(required) == 0:
2021-07-06T06:32:25.7869191Z hint = ''
2021-07-06T06:32:25.7869561Z if len(required) == 1:
2021-07-06T06:32:25.7869954Z hint = hintmsg % err_helpers[required[0]]
2021-07-06T06:32:25.7870493Z if len(required) > 1:
2021-07-06T06:32:25.7872598Z options = '\nOR\n'.join([err_helpers[x] for x in required])
2021-07-06T06:32:25.7873121Z hint = hintmsg % ("One of:\n%s" % options)
2021-07-06T06:32:25.7873561Z raise ValueError(errmsg % hint)
2021-07-06T06:32:25.7873851Z
2021-07-06T06:32:25.7874153Z if t in namedbackends:
2021-07-06T06:32:25.7874531Z # Try and load the specific named backend
2021-07-06T06:32:25.7874925Z lib = select_known_backend(t)
2021-07-06T06:32:25.7875268Z if not lib:
2021-07-06T06:32:25.7875675Z # something is missing preventing a valid backend from
2021-07-06T06:32:25.7876100Z # loading, set requirements for hinting
2021-07-06T06:32:25.7876675Z if t == 'tbb':
2021-07-06T06:32:25.7877710Z requirements.append('TBB')
2021-07-06T06:32:25.7878474Z elif t == 'omp' and _IS_OSX:
2021-07-06T06:32:25.7879065Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7880623Z libname = t
2021-07-06T06:32:25.7881315Z elif t in ['threadsafe', 'forksafe', 'safe']:
2021-07-06T06:32:25.7881752Z # User wants a specific behaviour...
2021-07-06T06:32:25.7882287Z available = ['tbb']
2021-07-06T06:32:25.7882791Z requirements.append('TBB')
2021-07-06T06:32:25.7883163Z if t == "safe":
2021-07-06T06:32:25.7883586Z # "safe" is TBB, which is fork and threadsafe everywhere
2021-07-06T06:32:25.7883972Z pass
2021-07-06T06:32:25.7884323Z elif t == "threadsafe":
2021-07-06T06:32:25.7884685Z if _IS_OSX:
2021-07-06T06:32:25.7885292Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7885697Z # omp is threadsafe everywhere
2021-07-06T06:32:25.7886391Z available.append('omp')
2021-07-06T06:32:25.7886940Z elif t == "forksafe":
2021-07-06T06:32:25.7887360Z # everywhere apart from linux (GNU OpenMP) has a guaranteed
2021-07-06T06:32:25.7887848Z # forksafe OpenMP, as OpenMP has better performance, prefer
2021-07-06T06:32:25.7888584Z # this to workqueue
2021-07-06T06:32:25.7889118Z if not _IS_LINUX:
2021-07-06T06:32:25.7889657Z available.append('omp')
2021-07-06T06:32:25.7890039Z if _IS_OSX:
2021-07-06T06:32:25.7890578Z requirements.append('OSX_OMP')
2021-07-06T06:32:25.7890992Z # workqueue is forksafe everywhere
2021-07-06T06:32:25.7891541Z available.append('workqueue')
2021-07-06T06:32:25.7891935Z else: # unreachable
2021-07-06T06:32:25.7892331Z msg = "No threading layer available for purpose %s"
2021-07-06T06:32:25.7892752Z raise ValueError(msg % t)
2021-07-06T06:32:25.7893104Z # select amongst available
2021-07-06T06:32:25.7893479Z lib, libname = select_from_backends(available)
2021-07-06T06:32:25.7894042Z elif t == 'default':
2021-07-06T06:32:25.7894784Z # If default is supplied, try them in order, tbb, omp,
2021-07-06T06:32:25.7895169Z # workqueue
2021-07-06T06:32:25.7895530Z lib, libname = select_from_backends(namedbackends)
2021-07-06T06:32:25.7895941Z if not lib:
2021-07-06T06:32:25.7896290Z # set requirements for hinting
2021-07-06T06:32:25.7896843Z
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment