Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
System info export for debugging and bug reporting (#34)
* System info export for debugging and bug reporting Signed-off-by: Ryan Nett <rnett@skymind.io> * class name fix Signed-off-by: Ryan Nett <rnett@skymind.io> * add version information, pointer memory info Signed-off-by: Ryan Nett <rnett@skymind.io> * add nvidia-smi and nvcc info Signed-off-by: Ryan Nett <rnett@skymind.io> * line cleanup Signed-off-by: Ryan Nett <rnett@skymind.io> * nvidia-smi run works Signed-off-by: Ryan Nett <rnett@skymind.io> * add oshi dependency Signed-off-by: Ryan Nett <rnett@skymind.io> * use OS info, add workspaces info Signed-off-by: Ryan Nett <rnett@skymind.io> * use ServiceLoader to load GPU information Signed-off-by: Ryan Nett <rnett@skymind.io> * register service Signed-off-by: Ryan Nett <rnett@skymind.io> * moved service out of NativeOpsHolder (private constructor) Signed-off-by: Ryan Nett <rnett@skymind.io> * added newline Signed-off-by: Ryan Nett <rnett@skymind.io> * added license Signed-off-by: Ryan Nett <rnett@skymind.io> * and one more Signed-off-by: Ryan Nett <rnett@skymind.io> * copyright update Signed-off-by: Ryan Nett <rnett@skymind.io> * fixes Signed-off-by: Ryan Nett <rnett@skymind.io> * removed unused imports Signed-off-by: Ryan Nett <rnett@skymind.io> * removed more unused imports Signed-off-by: Ryan Nett <rnett@skymind.io> * close streams Signed-off-by: Ryan Nett <rnett@skymind.io> * and another one Signed-off-by: Ryan Nett <rnett@skymind.io> * use method Signed-off-by: Ryan Nett <rnett@skymind.io> * one more copyright Signed-off-by: Ryan Nett <rnett@skymind.io> * remove double license Signed-off-by: Ryan Nett <rnett@skymind.io> * moved test to correct package Signed-off-by: Ryan Nett <rnett@skymind.io> * classpath update Signed-off-by: Ryan Nett <rnett@skymind.io> * classpath for java >8 fix Signed-off-by: Ryan Nett <rnett@skymind.io>
- Loading branch information
Ryan Nett
committed
Jul 2, 2019
1 parent
93d6d75
commit 3480e6d
Showing
9 changed files
with
628 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/systeminfo/GPUInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2015-2019 Skymind, Inc. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
******************************************************************************/ | ||
|
||
package org.nd4j.systeminfo; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public class GPUInfo { | ||
|
||
public static final String fGpu = " %-30s %-5s %24s %24s %24s"; | ||
|
||
private String name; | ||
private long totalMemory; | ||
private long freeMemory; | ||
int major; | ||
int minor; | ||
|
||
@Override | ||
public String toString(){ | ||
return String.format(fGpu, name, major + "." + minor, SystemInfo.fBytes(totalMemory), | ||
SystemInfo.fBytes(totalMemory - freeMemory), SystemInfo.fBytes(freeMemory)); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/systeminfo/GPUInfoProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2015-2019 Skymind, Inc. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
******************************************************************************/ | ||
|
||
package org.nd4j.systeminfo; | ||
|
||
import java.util.List; | ||
|
||
public interface GPUInfoProvider { | ||
List<GPUInfo> getGPUs(); | ||
} |
Oops, something went wrong.