75e78022d2df350ea220cee1b5e759ef9fc35a5b,test/test_gpu.py,,test_gpu_sinkhorn_lpl1,#,50
Before Change
transport = ot.da.OTDA_lpl1()
transport.fit(a, labels_a, b)
G1 = transport.G
time2 = time.time()
transport = ot.gpu.da.OTDA_lpl1()
transport.fit(a, labels_a, b)
G2 = transport.G
time3 = time.time()
print("Normal sinkhorn lpl1, time: {:6.2f} sec ".format(
time2 - time1))
describe_res(G1)
print(" GPU sinkhorn lpl1, time: {:6.2f} sec ".format(
time3 - time2))
After Change
wb = ot.unif(n_samples)
M = ot.dist(a.copy(), b.copy())
M2 = ot.gpu.dist(a.copy(), b.copy(), to_numpy=False)
reg = 1
G = ot.da.sinkhorn_lpl1_mm(wa, labels_a, wb, M, reg)
G1 = ot.gpu.da.sinkhorn_lpl1_mm(wa, labels_a, wb, M, reg)
np.testing.assert_allclose(G1, G, rtol=1e-10)
G2 = ot.gpu.da.sinkhorn_lpl1_mm(wa, labels_a, wb, M2, reg, to_numpy=False)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: rflamary/POT
Commit Name: 75e78022d2df350ea220cee1b5e759ef9fc35a5b
Time: 2018-09-24
Author: remi.flamary@gmail.com
File Name: test/test_gpu.py
Class Name:
Method Name: test_gpu_sinkhorn_lpl1
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: af164f572888a7ebdd2e6d297f6e35d98d598e53
Time: 2021-03-15
Author: tohaowu@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_virtual_machine.py
Class Name: GceVirtualMachine
Method Name: UpdateInterruptibleVmStatus
Project Name: rflamary/POT
Commit Name: 75e78022d2df350ea220cee1b5e759ef9fc35a5b
Time: 2018-09-24
Author: remi.flamary@gmail.com
File Name: test/test_gpu.py
Class Name:
Method Name: test_gpu_sinkhorn