core_match_template_distributed
Distributed multi-node version of the core match_template implementation.
core_match_template_distributed(world_size, rank, local_rank, device, orientation_batch_size=1, num_cuda_streams=1, backend='streamed', **kwargs)
Distributed multi-node core function for the match template program.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
world_size
|
int
|
Total number of processes in the distributed job. |
required |
rank
|
int
|
Global rank of this process. |
required |
local_rank
|
int
|
Local rank of this process on the current node. |
required |
device
|
device
|
The CUDA device to use for this process. This must be a single device. |
required |
orientation_batch_size
|
int
|
Number of orientations to process in a single batch, by default 1. |
1
|
num_cuda_streams
|
int
|
Number of CUDA streams to use for overlapping data transfers and computation, by default 1. |
1
|
backend
|
str
|
The backend to use for computation. Defaults to 'streamed'. Must be 'streamed' or 'batched'. |
'streamed'
|
**kwargs
|
dict[str, Tensor]
|
Additional keyword arguments passed to the single-GPU core function. For the zeroth rank this should be a dictionary of Tensor objects with the following fields (all other ranks can pass an empty dictionary): - image_dft: Real-fourier transform (RFFT) of the image with large image filters already applied. Has shape (H, W // 2 + 1). - template_dft: Real-fourier transform (RFFT) of the template volume to take Fourier slices from. Has shape (l, h, w // 2 + 1) with the last dimension being the half-dimension for real-FFT transformation. NOTE: The original template volume should be a cubic volume, i.e. h == w == l. - ctf_filters: Stack of CTF filters at different pixel size (Cs) and defocus values to use in the search. Has shape (num_Cs, num_defocus, h, w // 2 + 1) where num_Cs are the number of pixel sizes searched over, and num_defocus are the number of defocus values searched over. - whitening_filter_template: Precomputed whitening filter for the template. Whitening filter for the template volume. Has shape (h, w // 2 + 1). Gets multiplied with the ctf filters to create a filter stack applied to each orientation projection. - euler_angles: Euler angles (in 'ZYZ' convention & in units of degrees) to search over. Has shape (num_orientations, 3). - defocus_values: 1D tensor of defocus values to search. What defoucs values correspond with the CTF filters, in units of Angstroms. Has shape (num_defocus,). - pixel_values: 1D tensor of pixel values to search. What pixel size values correspond with the CTF filters, in units of Angstroms. Has shape (num_Cs,). |
{}
|
Source code in src/leopard_em/backend/core_match_template_distributed.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | |