Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix debug tests and remove duplicate functions #547

Merged
merged 3 commits into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions debug-tests/debug_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
ITERATIONS = 100


def cuda_array(size):
return rmm.DeviceBuffer(size=size)


def set_rmm():
rmm.reinitialize(
pool_allocator=True, managed_memory=False, initial_pool_size=parse_bytes("6GB")
Expand Down Expand Up @@ -41,15 +37,6 @@ def parse_args(args=None):
return parser.parse_args()


def get_num_gpus():
jakirkham marked this conversation as resolved.
Show resolved Hide resolved
import pynvml

pynvml.nvmlInit()
ngpus = pynvml.nvmlDeviceGetCount()
pynvml.nvmlShutdown()
return ngpus


def get_cuda_devices():
if "CUDA_VISIBLE_DEVICES" in os.environ:
return os.environ["CUDA_VISIBLE_DEVICES"].split(",")
Expand Down
3 changes: 2 additions & 1 deletion debug-tests/recv.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import pynvml
import pytest
import ucp
from utils import ITERATIONS, recv, send, set_rmm
from debug_utils import ITERATIONS, set_rmm
from utils import recv, send

pynvml.nvmlInit()

Expand Down
3 changes: 2 additions & 1 deletion debug-tests/send.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import cloudpickle
import pytest
import ucp
from utils import ITERATIONS, recv, send, set_rmm
from debug_utils import ITERATIONS, set_rmm
from utils import recv, send

cmd = "nvidia-smi nvlink --setcontrol 0bz" # Get output in bytes
# subprocess.check_call(cmd, shell=True)
Expand Down