b331b9f29062a0e888dafc7a7d19ca8fa53286c1,invesalius/segmentation/brain/utils.py,,get_plaidml_devices,#,1

Before Change


    plaidml.settings._setup_for_test(plaidml.settings.user_settings)
    plaidml.settings.experimental = True
    devices, _ = plaidml.devices(ctx, limit=100, return_all=True)
    if gpu:
        for device in devices:
            if b"cuda" in device.description.lower():
                return device
        for device in devices:
            if b"opencl" in device.description.lower():
                return device
    for device in devices:
        if b"llvm" in device.description.lower():
            return device

After Change


            points += 1
        out_devices.append((points, device))

    out_devices.sort(reverse=True)
    return {device.description.decode("utf8"): device.id.decode("utf8") for points, device in out_devices }
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: invesalius/invesalius3
Commit Name: b331b9f29062a0e888dafc7a7d19ca8fa53286c1
Time: 2020-03-23
Author: totonixsame@gmail.com
File Name: invesalius/segmentation/brain/utils.py
Class Name:
Method Name: get_plaidml_devices


Project Name: tensorly/tensorly
Commit Name: f937bbf05fed3d436cd07d159b451d448fe6eba2
Time: 2021-02-06
Author: ameyer@ucla.edu
File Name: tensorly/backend/mxnet_backend.py
Class Name: MxnetBackend
Method Name: sort


Project Name: nilmtk/nilmtk
Commit Name: 72f3f5bf50ed2d91cdcfbe2cf47120a2df8883cd
Time: 2014-11-26
Author: jack-list@xlk.org.uk
File Name: nilmtk/elecmeter.py
Class Name: ElecMeter
Method Name: _get_stat_from_cache_or_compute


Project Name: explosion/thinc
Commit Name: 1aa811568255fefab02950473e961988f5bbb03c
Time: 2020-01-12
Author: honnibal+gh@gmail.com
File Name: examples/transformers_tagger.py
Class Name:
Method Name: main