-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1267 from aschaffer/enh_ext_compile_time_017
[REVIEW] Enhance compile time
- Loading branch information
Showing
21 changed files
with
618 additions
and
41 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This assumes the script is executed from the root of the repo directory | ||
./build.sh cugraph | ||
./build.sh cugraph --allgpuarch |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This assumes the script is executed from the root of the repo directory | ||
./build.sh libcugraph -v | ||
./build.sh libcugraph -v --allgpuarch |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Copyright (c) 2019-2020, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://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. | ||
# | ||
|
||
function(evaluate_gpu_archs gpu_archs) | ||
set(eval_file ${PROJECT_BINARY_DIR}/eval_gpu_archs.cu) | ||
set(eval_exe ${PROJECT_BINARY_DIR}/eval_gpu_archs) | ||
file(WRITE ${eval_file} | ||
" | ||
#include <cstdio> | ||
#include <set> | ||
#include <string> | ||
using namespace std; | ||
int main(int argc, char** argv) { | ||
set<string> archs; | ||
int nDevices; | ||
if((cudaGetDeviceCount(&nDevices) == cudaSuccess) && (nDevices > 0)) { | ||
for(int dev=0;dev<nDevices;++dev) { | ||
char buff[32]; | ||
cudaDeviceProp prop; | ||
if(cudaGetDeviceProperties(&prop, dev) != cudaSuccess) continue; | ||
sprintf(buff, \"%d%d\", prop.major, prop.minor); | ||
archs.insert(buff); | ||
} | ||
} | ||
if(archs.empty()) { | ||
printf(\"ALL\"); | ||
} else { | ||
bool first = true; | ||
for(set<string>::const_iterator itr=archs.begin();itr!=archs.end();++itr) { | ||
printf(first? \"%s\" : \";%s\", itr->c_str()); | ||
first = false; | ||
} | ||
} | ||
printf(\"\\n\"); | ||
return 0; | ||
} | ||
") | ||
execute_process( | ||
COMMAND ${CUDA_NVCC_EXECUTABLE} | ||
-o ${eval_exe} | ||
--run | ||
${eval_file} | ||
OUTPUT_VARIABLE __gpu_archs | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
set(__gpu_archs_filtered "${__gpu_archs}") | ||
foreach(arch ${__gpu_archs}) | ||
if (arch VERSION_LESS 60) | ||
list(REMOVE_ITEM __gpu_archs_filtered ${arch}) | ||
endif() | ||
endforeach() | ||
if (NOT __gpu_archs_filtered) | ||
message(FATAL_ERROR "No supported GPU arch found on this system") | ||
endif() | ||
message("Auto detection of gpu-archs: ${__gpu_archs_filtered}") | ||
set(${gpu_archs} ${__gpu_archs_filtered} PARENT_SCOPE) | ||
endfunction(evaluate_gpu_archs) |
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,91 @@ | ||
/* | ||
* Copyright (c) 2020, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://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. | ||
*/ | ||
#pragma once | ||
|
||
namespace cugraph { | ||
extern template class GraphViewBase<int32_t, int32_t, float>; | ||
extern template class GraphViewBase<int32_t, int32_t, double>; | ||
extern template class GraphViewBase<int32_t, int64_t, float>; | ||
extern template class GraphViewBase<int32_t, int64_t, double>; | ||
extern template class GraphViewBase<int64_t, int32_t, float>; | ||
extern template class GraphViewBase<int64_t, int32_t, double>; | ||
extern template class GraphViewBase<int64_t, int64_t, float>; | ||
extern template class GraphViewBase<int64_t, int64_t, double>; | ||
extern template class GraphCompressedSparseBaseView<int32_t, int32_t, float>; | ||
extern template class GraphCompressedSparseBaseView<int32_t, int32_t, double>; | ||
extern template class GraphCompressedSparseBaseView<int32_t, int64_t, float>; | ||
extern template class GraphCompressedSparseBaseView<int32_t, int64_t, double>; | ||
extern template class GraphCompressedSparseBaseView<int64_t, int32_t, float>; | ||
extern template class GraphCompressedSparseBaseView<int64_t, int32_t, double>; | ||
extern template class GraphCompressedSparseBaseView<int64_t, int64_t, float>; | ||
extern template class GraphCompressedSparseBaseView<int64_t, int64_t, double>; | ||
extern template class GraphCompressedSparseBase<int32_t, int32_t, float>; | ||
extern template class GraphCompressedSparseBase<int32_t, int32_t, double>; | ||
extern template class GraphCompressedSparseBase<int32_t, int64_t, float>; | ||
extern template class GraphCompressedSparseBase<int32_t, int64_t, double>; | ||
extern template class GraphCompressedSparseBase<int64_t, int32_t, float>; | ||
extern template class GraphCompressedSparseBase<int64_t, int32_t, double>; | ||
extern template class GraphCompressedSparseBase<int64_t, int64_t, float>; | ||
extern template class GraphCompressedSparseBase<int64_t, int64_t, double>; | ||
extern template class GraphCOOView<int32_t, int32_t, float>; | ||
extern template class GraphCOOView<int32_t, int32_t, double>; | ||
extern template class GraphCOOView<int32_t, int64_t, float>; | ||
extern template class GraphCOOView<int32_t, int64_t, double>; | ||
extern template class GraphCOOView<int64_t, int32_t, float>; | ||
extern template class GraphCOOView<int64_t, int32_t, double>; | ||
extern template class GraphCOOView<int64_t, int64_t, float>; | ||
extern template class GraphCOOView<int64_t, int64_t, double>; | ||
extern template class GraphCSRView<int32_t, int32_t, float>; | ||
extern template class GraphCSRView<int32_t, int32_t, double>; | ||
extern template class GraphCSRView<int32_t, int64_t, float>; | ||
extern template class GraphCSRView<int32_t, int64_t, double>; | ||
extern template class GraphCSRView<int64_t, int32_t, float>; | ||
extern template class GraphCSRView<int64_t, int32_t, double>; | ||
extern template class GraphCSRView<int64_t, int64_t, float>; | ||
extern template class GraphCSRView<int64_t, int64_t, double>; | ||
extern template class GraphCSCView<int32_t, int32_t, float>; | ||
extern template class GraphCSCView<int32_t, int32_t, double>; | ||
extern template class GraphCSCView<int32_t, int64_t, float>; | ||
extern template class GraphCSCView<int32_t, int64_t, double>; | ||
extern template class GraphCSCView<int64_t, int32_t, float>; | ||
extern template class GraphCSCView<int64_t, int32_t, double>; | ||
extern template class GraphCSCView<int64_t, int64_t, float>; | ||
extern template class GraphCSCView<int64_t, int64_t, double>; | ||
extern template class GraphCOO<int32_t, int32_t, float>; | ||
extern template class GraphCOO<int32_t, int32_t, double>; | ||
extern template class GraphCOO<int32_t, int64_t, float>; | ||
extern template class GraphCOO<int32_t, int64_t, double>; | ||
extern template class GraphCOO<int64_t, int32_t, float>; | ||
extern template class GraphCOO<int64_t, int32_t, double>; | ||
extern template class GraphCOO<int64_t, int64_t, float>; | ||
extern template class GraphCOO<int64_t, int64_t, double>; | ||
extern template class GraphCSR<int32_t, int32_t, float>; | ||
extern template class GraphCSR<int32_t, int32_t, double>; | ||
extern template class GraphCSR<int32_t, int64_t, float>; | ||
extern template class GraphCSR<int32_t, int64_t, double>; | ||
extern template class GraphCSR<int64_t, int32_t, float>; | ||
extern template class GraphCSR<int64_t, int32_t, double>; | ||
extern template class GraphCSR<int64_t, int64_t, float>; | ||
extern template class GraphCSR<int64_t, int64_t, double>; | ||
extern template class GraphCSC<int32_t, int32_t, float>; | ||
extern template class GraphCSC<int32_t, int32_t, double>; | ||
extern template class GraphCSC<int32_t, int64_t, float>; | ||
extern template class GraphCSC<int32_t, int64_t, double>; | ||
extern template class GraphCSC<int64_t, int32_t, float>; | ||
extern template class GraphCSC<int64_t, int32_t, double>; | ||
extern template class GraphCSC<int64_t, int64_t, float>; | ||
extern template class GraphCSC<int64_t, int64_t, double>; | ||
} // namespace cugraph |
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,73 @@ | ||
/* | ||
* Copyright (c) 2020, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://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. | ||
*/ | ||
#pragma once | ||
|
||
namespace cugraph { | ||
template class GraphViewBase<int32_t, int32_t, float>; | ||
template class GraphViewBase<int32_t, int32_t, double>; | ||
template class GraphViewBase<int32_t, int64_t, float>; | ||
template class GraphViewBase<int32_t, int64_t, double>; | ||
template class GraphViewBase<int64_t, int64_t, float>; | ||
template class GraphViewBase<int64_t, int64_t, double>; | ||
template class GraphCompressedSparseBaseView<int32_t, int32_t, float>; | ||
template class GraphCompressedSparseBaseView<int32_t, int32_t, double>; | ||
template class GraphCompressedSparseBaseView<int32_t, int64_t, float>; | ||
template class GraphCompressedSparseBaseView<int32_t, int64_t, double>; | ||
template class GraphCompressedSparseBaseView<int64_t, int64_t, float>; | ||
template class GraphCompressedSparseBaseView<int64_t, int64_t, double>; | ||
template class GraphCompressedSparseBase<int32_t, int32_t, float>; | ||
template class GraphCompressedSparseBase<int32_t, int32_t, double>; | ||
template class GraphCompressedSparseBase<int32_t, int64_t, float>; | ||
template class GraphCompressedSparseBase<int32_t, int64_t, double>; | ||
template class GraphCompressedSparseBase<int64_t, int64_t, float>; | ||
template class GraphCompressedSparseBase<int64_t, int64_t, double>; | ||
template class GraphCOOView<int32_t, int32_t, float>; | ||
template class GraphCOOView<int32_t, int32_t, double>; | ||
template class GraphCOOView<int32_t, int64_t, float>; | ||
template class GraphCOOView<int32_t, int64_t, double>; | ||
template class GraphCOOView<int64_t, int64_t, float>; | ||
template class GraphCOOView<int64_t, int64_t, double>; | ||
template class GraphCSRView<int32_t, int32_t, float>; | ||
template class GraphCSRView<int32_t, int32_t, double>; | ||
template class GraphCSRView<int32_t, int64_t, float>; | ||
template class GraphCSRView<int32_t, int64_t, double>; | ||
template class GraphCSRView<int64_t, int64_t, float>; | ||
template class GraphCSRView<int64_t, int64_t, double>; | ||
template class GraphCSCView<int32_t, int32_t, float>; | ||
template class GraphCSCView<int32_t, int32_t, double>; | ||
template class GraphCSCView<int32_t, int64_t, float>; | ||
template class GraphCSCView<int32_t, int64_t, double>; | ||
template class GraphCSCView<int64_t, int64_t, float>; | ||
template class GraphCSCView<int64_t, int64_t, double>; | ||
template class GraphCOO<int32_t, int32_t, float>; | ||
template class GraphCOO<int32_t, int32_t, double>; | ||
template class GraphCOO<int32_t, int64_t, float>; | ||
template class GraphCOO<int32_t, int64_t, double>; | ||
template class GraphCOO<int64_t, int64_t, float>; | ||
template class GraphCOO<int64_t, int64_t, double>; | ||
template class GraphCSR<int32_t, int32_t, float>; | ||
template class GraphCSR<int32_t, int32_t, double>; | ||
template class GraphCSR<int32_t, int64_t, float>; | ||
template class GraphCSR<int32_t, int64_t, double>; | ||
template class GraphCSR<int64_t, int64_t, float>; | ||
template class GraphCSR<int64_t, int64_t, double>; | ||
template class GraphCSC<int32_t, int32_t, float>; | ||
template class GraphCSC<int32_t, int32_t, double>; | ||
template class GraphCSC<int32_t, int64_t, float>; | ||
template class GraphCSC<int32_t, int64_t, double>; | ||
template class GraphCSC<int64_t, int64_t, float>; | ||
template class GraphCSC<int64_t, int64_t, double>; | ||
} // namespace cugraph |
Oops, something went wrong.