Skip to content

Commit

Permalink
Fix cuda issues in test design
Browse files Browse the repository at this point in the history
  • Loading branch information
sjfleming committed Aug 29, 2023
1 parent b98b20b commit 1a3ce15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cellbender/remove_background/tests/test_dataprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def test_dataloader_sorting(simulated_dataset, cuda):
bcs_i = loader.unsort_inds(bcs_i)

# Add sparse matrix values to lists.
barcodes.append(bcs_i)
genes.append(genes_i)
counts.append(counts_i)
barcodes.append(bcs_i.detach().cpu())
genes.append(genes_i.detach().cpu())
counts.append(counts_i.detach().cpu())

# Increment barcode index counter.
ind += data.shape[0] # Same as data_loader.batch_size
Expand Down
6 changes: 3 additions & 3 deletions cellbender/remove_background/tests/test_sparse_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def test_dense_to_sparse_op_torch(simulated_dataset, cuda):
bcs_i = data_loader.unsort_inds(bcs_i)

# Add sparse matrix values to lists.
barcodes.append(bcs_i)
genes.append(genes_i)
counts.append(counts_i)
barcodes.append(bcs_i.detach().cpu())
genes.append(genes_i.detach().cpu())
counts.append(counts_i.detach().cpu())

# Increment barcode index counter.
ind += data.shape[0] # Same as data_loader.batch_size
Expand Down

0 comments on commit 1a3ce15

Please sign in to comment.