.hipconfig now lives in lib
Also moved reading .hipconfig to begining of hipcc Change-Id: Ibb9d32bef64a79f189aa037c36814759c8cc8052
This commit is contained in:
@@ -172,7 +172,7 @@ if(HIP_PLATFORM STREQUAL "hcc")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Install .hipconfig
|
# Install .hipconfig
|
||||||
install(FILES ${PROJECT_BINARY_DIR}/.hipconfig DESTINATION bin)
|
install(FILES ${PROJECT_BINARY_DIR}/.hipconfig DESTINATION lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Install src, bin, include if necessary
|
# Install src, bin, include if necessary
|
||||||
|
|||||||
+19
-18
@@ -31,6 +31,25 @@ $verbose = 0 unless defined $verbose;
|
|||||||
$HIP_PATH=$ENV{'HIP_PATH'};
|
$HIP_PATH=$ENV{'HIP_PATH'};
|
||||||
$HIP_PATH=dirname (dirname $0) unless defined $HIP_PATH; # use parent directory of hipcc
|
$HIP_PATH=dirname (dirname $0) unless defined $HIP_PATH; # use parent directory of hipcc
|
||||||
|
|
||||||
|
#---
|
||||||
|
# Read .hipconfig
|
||||||
|
my %hipConfig = ();
|
||||||
|
$hipConfig{'VALID'}=0;
|
||||||
|
if (open (CONFIG, "$HIP_PATH/lib/.hipconfig")) {
|
||||||
|
while (<CONFIG>) {
|
||||||
|
my $config_line=$_;
|
||||||
|
chop ($config_line);
|
||||||
|
$config_line =~ s/^\s*//;
|
||||||
|
$config_line =~ s/\s*$//;
|
||||||
|
if (($config_line !~ /^#/) && ($config_line ne "")) {
|
||||||
|
my ($name, $value) = split (/=/, $config_line);
|
||||||
|
$hipConfig{$name} = $value;
|
||||||
|
$hipConfig{'VALID'}=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(CONFIG);
|
||||||
|
}
|
||||||
|
|
||||||
#---
|
#---
|
||||||
#HIP_PLATFORM controls whether to use NVCC or HCC for compilation:
|
#HIP_PLATFORM controls whether to use NVCC or HCC for compilation:
|
||||||
$HIP_PLATFORM= `$HIP_PATH/bin/hipconfig --platform`;
|
$HIP_PLATFORM= `$HIP_PATH/bin/hipconfig --platform`;
|
||||||
@@ -241,24 +260,6 @@ if ($needHipHcc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Read .hipconfig
|
|
||||||
my %hipConfig = ();
|
|
||||||
$hipConfig{'VALID'}=0;
|
|
||||||
if (open (CONFIG, "$HIP_PATH/bin/.hipconfig")) {
|
|
||||||
while (<CONFIG>) {
|
|
||||||
my $config_line=$_;
|
|
||||||
chop ($config_line);
|
|
||||||
$config_line =~ s/^\s*//;
|
|
||||||
$config_line =~ s/\s*$//;
|
|
||||||
if (($config_line !~ /^#/) && ($config_line ne "")) {
|
|
||||||
my ($name, $value) = split (/=/, $config_line);
|
|
||||||
$hipConfig{$name} = $value;
|
|
||||||
$hipConfig{'VALID'}=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(CONFIG);
|
|
||||||
}
|
|
||||||
|
|
||||||
# hipcc currrently requires separate compilation of source files, ie it is not possible to pass
|
# hipcc currrently requires separate compilation of source files, ie it is not possible to pass
|
||||||
# CPP files combined with .O files
|
# CPP files combined with .O files
|
||||||
# Reason is that NVCC uses the file extension to determine whether to compile in CUDA mode or
|
# Reason is that NVCC uses the file extension to determine whether to compile in CUDA mode or
|
||||||
|
|||||||
Reference in New Issue
Block a user